blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
721
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
5
91
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
321 values
visit_date
timestamp[ns]date
2016-08-12 09:31:09
2023-09-06 10:45:07
revision_date
timestamp[ns]date
2010-09-28 14:01:40
2023-09-06 06:22:19
committer_date
timestamp[ns]date
2010-09-28 14:01:40
2023-09-06 06:22:19
github_id
int64
426
681M
star_events_count
int64
101
243k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
23 values
gha_event_created_at
timestamp[ns]date
2012-06-28 18:51:49
2023-09-14 21:59:16
gha_created_at
timestamp[ns]date
2008-02-11 22:55:26
2023-08-10 11:14:58
gha_language
stringclasses
147 values
src_encoding
stringclasses
26 values
language
stringclasses
2 values
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
6
10.2M
extension
stringclasses
115 values
filename
stringlengths
3
113
content
stringlengths
6
10.2M
f8f64761f0b4c8cde0909dc911ce44301da250bd
cb63654855f89c56328dbb89fecc7e25b5f62c65
/tests/unit/test_kinput.c
c43564b6728f8decd7778f5fdd6989b59bf464e3
[ "Apache-2.0" ]
permissive
adsr/mle
6aa6ea8e398b1054bdf286e7f3557b6bdd6e1b53
9a7ecc3b38d1085e69e877a73ba15fd442164e40
refs/heads/master
2023-09-01T16:12:04.126271
2023-08-26T19:10:54
2023-08-26T19:10:54
28,325,201
813
61
Apache-2.0
2023-06-23T05:39:52
2014-12-22T05:05:38
C
UTF-8
C
false
false
2,149
c
test_kinput.c
#include "test.h" #define NUM_KINPUTS 256 #define OFFSETOF(TYPE, ELEMENT) ((size_t)&(((TYPE *)0)->ELEMENT)) char *str = ""; void test(buffer_t *buf, mark_t *cur) { kinput_t weird_input[NUM_KINPUTS]; kinput_t input; int result; size_t i, j; size_t offsetof_mod, offsetof_ch, offsetof_key; offsetof_mod = OFFSETOF(kinput_t, mod); offsetof_ch = OFFSETOF(kinput_t, ch); offsetof_key = OFFSETOF(kinput_t, key); // Fill weird_input values for (i = 0; i < sizeof(kinput_t) * NUM_KINPUTS; i++) { *(((uint8_t*)weird_input) + i) = (uint8_t)i; } // Ensure MLE_KINPUT_COPY *preserves* padding bytes result = 0; for (i = 0; i < NUM_KINPUTS; i++) { MLE_KINPUT_COPY(input, weird_input[i]); result |= memcmp(&input, &weird_input[i], sizeof(kinput_t)); } ASSERT("cmp_kinput_assign", 0, result); // Ensure MLE_KINPUT_SET *zeroes* padding bytes result = 0; for (i = 0; i < NUM_KINPUTS; i++) { // Fill input with non-sense; 42 is a good choice memset(&input, 42, sizeof(input)); // Set input to weird_input[i] MLE_KINPUT_SET(input, weird_input[i].mod, weird_input[i].ch, weird_input[i].key); // Ensure all fields are equal result |= memcmp(&input.mod, &weird_input[i].mod, sizeof(input.mod)); result |= memcmp(&input.ch, &weird_input[i].ch, sizeof(input.ch)); result |= memcmp(&input.key, &weird_input[i].key, sizeof(input.key)); // Ensure bytes between mod and ch are zero for (j = offsetof_mod + sizeof(input.mod); j < offsetof_ch; j++) { result |= *(((uint8_t*)&input) + j) == 0x00 ? 0 : 1; } // Ensure bytes between ch and key are zero for (j = offsetof_ch + sizeof(input.ch); j < offsetof_key; j++) { result |= *(((uint8_t*)&input) + j) == 0x00 ? 0 : 1; } // Ensure bytes between key and end are zero for (j = offsetof_key + sizeof(input.key); j < sizeof(kinput_t); j++) { result |= *(((uint8_t*)&input) + j) == 0x00 ? 0 : 1; } } ASSERT("cmp_kinput_set", 0, result); }
13a736effd3c88d2021523ea4c661b054a40b35e
f1ee65fbe1ffc43c2aac45e41515f1987eb534a4
/src/third_party/nasm/include/insns.h
00de2887cb0af345e836f1c054871824347223e3
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
klzgrad/naiveproxy
6e0d206b6f065b9311d1e12b363109f2d35cc058
8ef1cecadfd4e2b5d57e7ea2fa42d05717e51c2e
refs/heads/master
2023-08-20T22:42:12.511091
2023-06-04T03:54:34
2023-08-16T23:30:19
119,178,893
5,710
976
BSD-3-Clause
2023-08-05T10:59:59
2018-01-27T16:02:33
C++
UTF-8
C
false
false
3,173
h
insns.h
/* insns.h header file for insns.c * * The Netwide Assembler is copyright (C) 1996 Simon Tatham and * Julian Hall. All rights reserved. The software is * redistributable under the license given in the file "LICENSE" * distributed in the NASM archive. */ #ifndef NASM_INSNS_H #define NASM_INSNS_H #include "nasm.h" #include "tokens.h" #include "iflag.h" /* if changed, ITEMPLATE_END should be also changed accordingly */ struct itemplate { enum opcode opcode; /* the token, passed from "parser.c" */ int operands; /* number of operands */ opflags_t opd[MAX_OPERANDS]; /* bit flags for operand types */ decoflags_t deco[MAX_OPERANDS]; /* bit flags for operand decorators */ const uint8_t *code; /* the code it assembles to */ uint32_t iflag_idx; /* some flags referenced by index */ }; /* Use this helper to test instruction template flags */ static inline bool itemp_has(const struct itemplate *itemp, unsigned int bit) { return iflag_test(&insns_flags[itemp->iflag_idx], bit); } /* Disassembler table structure */ /* * If n == -1, then p points to another table of 256 * struct disasm_index, otherwise p points to a list of n * struct itemplates to consider. */ struct disasm_index { const void *p; int n; }; /* Tables for the assembler and disassembler, respectively */ extern const struct itemplate * const nasm_instructions[]; extern const struct disasm_index itable[256]; extern const struct disasm_index * const itable_vex[NASM_VEX_CLASSES][32][4]; /* Common table for the byte codes */ extern const uint8_t nasm_bytecodes[]; /* * this define is used to signify the end of an itemplate */ #define ITEMPLATE_END {I_none,0,{0,},{0,},NULL,0} /* * Pseudo-op tests */ /* DB-type instruction (DB, DW, ...) */ static inline bool const_func opcode_is_db(enum opcode opcode) { return opcode >= I_DB && opcode < I_RESB; } /* RESB-type instruction (RESB, RESW, ...) */ static inline bool const_func opcode_is_resb(enum opcode opcode) { return opcode >= I_RESB && opcode < I_INCBIN; } /* Width of Dx and RESx instructions */ /* * initialized data bytes length from opcode */ static inline int const_func db_bytes(enum opcode opcode) { switch (opcode) { case I_DB: return 1; case I_DW: return 2; case I_DD: return 4; case I_DQ: return 8; case I_DT: return 10; case I_DO: return 16; case I_DY: return 32; case I_DZ: return 64; case I_none: return -1; default: return 0; } } /* * Uninitialized data bytes length from opcode */ static inline int const_func resb_bytes(enum opcode opcode) { switch (opcode) { case I_RESB: return 1; case I_RESW: return 2; case I_RESD: return 4; case I_RESQ: return 8; case I_REST: return 10; case I_RESO: return 16; case I_RESY: return 32; case I_RESZ: return 64; case I_none: return -1; default: return 0; } } #endif /* NASM_INSNS_H */
20f8307522ca1241ad57935ee1203aee434e3c42
5f86fc385c7dcfcb5b166cdea7c8b13057b8bb5f
/3rdparty/musl/patches/execinfo.h
87271cead729cfbb5a6e406904042455a9088053
[ "BSD-3-Clause", "OpenSSL", "MIT", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-mit-nagy", "LicenseRef-scancode-other-permissive", "BSD-2-Clause" ]
permissive
openenclave/openenclave
54a38e12d9aa73357d9f438a07cd8c07ffe5e6df
cdeb95c1ec163117de409295333b6b2702013e08
refs/heads/master
2023-08-14T16:43:32.049533
2023-07-21T15:58:54
2023-07-21T15:58:54
101,804,230
800
372
MIT
2023-09-12T20:26:02
2017-08-29T20:31:38
C
UTF-8
C
false
false
597
h
execinfo.h
// Copyright (c) Open Enclave SDK contributors. // Licensed under the MIT License. #ifndef _OE_MUSL_PATCHES_EXECINFO_H #define _OE_MUSL_PATCHES_EXECINFO_H #include <openenclave/bits/defs.h> OE_EXTERNC_BEGIN // See https://www.gnu.org/software/libc/manual/html_node/Backtraces.html // for a description of the GNU backtrace functions. int backtrace(void** buffer, int size); char** backtrace_symbols(void* const* buffer, int size); // This is not implemented yet. // void backtrace_symbols_fd(void *const *buffer, int size, int fd); OE_EXTERNC_END #endif /* _OE_MUSL_PATCHES_EXECINFO_H */
9aa00e36e50da8d1c9e7c23257c920f9cd4324fb
bd2d10908f64cc13e95f6c814212cbeafb210e8e
/shell/task/simple_command.c
ad876a27d20bc69d1cd6e292ece5a31a1623f296
[ "MIT" ]
permissive
emersion/mrsh
0c0f62cb38e3cb2b7bc129516320d005408fc430
a858396b79ba217760b0982dd6f45c91c5192c3b
refs/heads/master
2022-10-11T22:23:39.276703
2022-09-14T16:23:46
2022-09-14T16:38:01
136,838,539
544
50
MIT
2021-05-18T07:24:13
2018-06-10T19:27:33
C
UTF-8
C
false
false
9,084
c
simple_command.c
#define _POSIX_C_SOURCE 200809L #include <assert.h> #include <errno.h> #include <fcntl.h> #include <mrsh/ast.h> #include <mrsh/builtin.h> #include <mrsh/entry.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "shell/shell.h" #include "shell/path.h" #include "shell/redir.h" #include "shell/word.h" #include "shell/task.h" static void populate_env_iterator(const char *key, void *_var, void *_) { struct mrsh_variable *var = _var; if ((var->attribs & MRSH_VAR_ATTRIB_EXPORT)) { setenv(key, var->value, 1); } } /** * Put the process into its job's process group. This has to be done both in the * parent and the child because of potential race conditions. */ static struct mrsh_process *init_child(struct mrsh_context *ctx, pid_t pid) { struct mrsh_process *proc = process_create(ctx->state, pid); if (ctx->state->options & MRSH_OPT_MONITOR) { job_add_process(ctx->job, proc); if (ctx->state->interactive && !ctx->background) { job_set_foreground(ctx->job, true, false); } } return proc; } static int run_process(struct mrsh_context *ctx, struct mrsh_simple_command *sc, char **argv) { struct mrsh_state *state = ctx->state; struct mrsh_state_priv *priv = state_get_priv(state); // The pipeline is responsible for creating the job assert(ctx->job != NULL); char *path = expand_path(ctx->state, argv[0], true, false); if (!path) { fprintf(stderr, "%s: not found\n", argv[0]); return 127; } pid_t pid = fork(); if (pid < 0) { perror("fork"); return TASK_STATUS_ERROR; } else if (pid == 0) { init_child(ctx, getpid()); if (state->options & MRSH_OPT_MONITOR) { init_job_child_process(state); } for (size_t i = 0; i < sc->assignments.len; ++i) { struct mrsh_assignment *assign = sc->assignments.data[i]; uint32_t prev_attribs; if (mrsh_env_get(state, assign->name, &prev_attribs) && (prev_attribs & MRSH_VAR_ATTRIB_READONLY)) { fprintf(stderr, "cannot modify readonly variable %s\n", assign->name); exit(1); } char *value = mrsh_word_str(assign->value); setenv(assign->name, value, true); free(value); } mrsh_hashtable_for_each(&priv->variables, populate_env_iterator, NULL); for (size_t i = 0; i < sc->io_redirects.len; ++i) { struct mrsh_io_redirect *redir = sc->io_redirects.data[i]; int redir_fd; int fd = process_redir(redir, &redir_fd); if (fd < 0) { exit(1); } if (fd == redir_fd) { continue; } int ret = dup2(fd, redir_fd); if (ret < 0) { fprintf(stderr, "cannot duplicate file descriptor: %s\n", strerror(errno)); exit(1); } } execv(path, argv); // Something went wrong fprintf(stderr, "%s: %s\n", argv[0], strerror(errno)); exit(127); } free(path); struct mrsh_process *process = init_child(ctx, pid); return job_wait_process(process); } struct saved_fd { int dup_fd; int redir_fd; }; static bool dup_and_save_fd(int fd, int redir_fd, struct saved_fd *saved) { saved->redir_fd = redir_fd; saved->dup_fd = -1; if (fd == redir_fd) { return true; } saved->dup_fd = dup(redir_fd); if (saved->dup_fd < 0) { fprintf(stderr, "failed to duplicate file descriptor: %s\n", strerror(errno)); return false; } if (dup2(fd, redir_fd) < 0) { fprintf(stderr, "failed to duplicate file descriptor: %s\n", strerror(errno)); return false; } return true; } static int run_builtin(struct mrsh_context *ctx, struct mrsh_simple_command *sc, int argc, char **argv) { // Duplicate old FDs to be able to restore them later // Zero-length VLAs are undefined behaviour struct saved_fd fds[sc->io_redirects.len + 1]; for (size_t i = 0; i < sizeof(fds) / sizeof(fds[0]); ++i) { fds[i].dup_fd = fds[i].redir_fd = -1; } for (size_t i = 0; i < sc->io_redirects.len; ++i) { struct mrsh_io_redirect *redir = sc->io_redirects.data[i]; struct saved_fd *saved = &fds[i]; int redir_fd; int fd = process_redir(redir, &redir_fd); if (fd < 0) { return TASK_STATUS_ERROR; } if (!dup_and_save_fd(fd, redir_fd, saved)) { return TASK_STATUS_ERROR; } } // TODO: environment from assignements int ret = mrsh_run_builtin(ctx->state, argc, argv); // In case stdout/stderr are pipes, we need to flush to ensure output lines // aren't out-of-order fflush(stdout); fflush(stderr); // Restore old FDs for (size_t i = 0; i < sizeof(fds) / sizeof(fds[0]); ++i) { if (fds[i].dup_fd < 0) { continue; } if (dup2(fds[i].dup_fd, fds[i].redir_fd) < 0) { fprintf(stderr, "failed to duplicate file descriptor: %s\n", strerror(errno)); return TASK_STATUS_ERROR; } close(fds[i].dup_fd); } return ret; } static int run_assignments(struct mrsh_context *ctx, struct mrsh_array *assignments) { for (size_t i = 0; i < assignments->len; ++i) { struct mrsh_assignment *assign = assignments->data[i]; char *new_value = mrsh_word_str(assign->value); uint32_t attribs = MRSH_VAR_ATTRIB_NONE; if ((ctx->state->options & MRSH_OPT_ALLEXPORT)) { attribs = MRSH_VAR_ATTRIB_EXPORT; } uint32_t prev_attribs = 0; if (mrsh_env_get(ctx->state, assign->name, &prev_attribs) != NULL && (prev_attribs & MRSH_VAR_ATTRIB_READONLY)) { free(new_value); fprintf(stderr, "cannot modify readonly variable %s\n", assign->name); return TASK_STATUS_ERROR; } mrsh_env_set(ctx->state, assign->name, new_value, attribs); free(new_value); } return 0; } static int expand_assignments(struct mrsh_context *ctx, struct mrsh_array *assignments) { for (size_t i = 0; i < assignments->len; ++i) { struct mrsh_assignment *assign = assignments->data[i]; expand_tilde(ctx->state, &assign->value, true); int ret = run_word(ctx, &assign->value); if (ret < 0) { return ret; } } return 0; } static struct mrsh_simple_command *copy_simple_command( const struct mrsh_simple_command *sc) { struct mrsh_command *cmd = mrsh_command_copy(&sc->command); return mrsh_command_get_simple_command(cmd); } int run_simple_command(struct mrsh_context *ctx, struct mrsh_simple_command *sc) { struct mrsh_state *state = ctx->state; struct mrsh_state_priv *priv = state_get_priv(state); if (sc->name == NULL) { // Copy each assignment from the AST, because during expansion and // substitution we'll mutate the tree struct mrsh_array assignments = {0}; mrsh_array_reserve(&assignments, sc->assignments.len); for (size_t i = 0; i < sc->assignments.len; ++i) { struct mrsh_assignment *assign = sc->assignments.data[i]; mrsh_array_add(&assignments, mrsh_assignment_copy(assign)); } int ret = expand_assignments(ctx, &assignments); if (ret < 0) { return ret; } ret = run_assignments(ctx, &assignments); if (ret < 0) { return ret; } for (size_t i = 0; i < assignments.len; ++i) { struct mrsh_assignment *assign = assignments.data[i]; mrsh_assignment_destroy(assign); } mrsh_array_finish(&assignments); return 0; } // Copy the command from the AST, because during expansion and substitution // we'll mutate the tree sc = copy_simple_command(sc); struct mrsh_array args = {0}; int ret = expand_word(ctx, sc->name, &args); if (ret < 0) { return ret; } for (size_t i = 0; i < sc->arguments.len; ++i) { struct mrsh_word *arg = sc->arguments.data[i]; ret = expand_word(ctx, arg, &args); if (ret < 0) { return ret; } } assert(args.len > 0); mrsh_array_add(&args, NULL); ret = expand_assignments(ctx, &sc->assignments); if (ret < 0) { return ret; } for (size_t i = 0; i < sc->io_redirects.len; ++i) { struct mrsh_io_redirect *redir = sc->io_redirects.data[i]; expand_tilde(state, &redir->name, false); ret = run_word(ctx, &redir->name); if (ret < 0) { return ret; } for (size_t j = 0; j < redir->here_document.len; ++j) { struct mrsh_word **line_word_ptr = (struct mrsh_word **)&redir->here_document.data[j]; expand_tilde(state, line_word_ptr, false); ret = run_word(ctx, line_word_ptr); if (ret < 0) { return ret; } } } char **argv = (char **)args.data; int argc = args.len - 1; // argv is NULL-terminated const char *argv_0 = argv[0]; if ((state->options & MRSH_OPT_XTRACE)) { char *ps4 = mrsh_get_ps4(state); fprintf(stderr, "%s", ps4); for (int i = 0; i < argc; ++i) { fprintf(stderr, "%s%s", i > 0 ? " " : "", argv[i]); } fprintf(stderr, "\n"); free(ps4); } ret = -1; const struct mrsh_function *fn_def = mrsh_hashtable_get(&priv->functions, argv_0); if (fn_def != NULL) { push_frame(state, argc, (const char **)argv); // fn_def may be free'd during run_command when overwritten with another // function, so we need to copy it. struct mrsh_command *body = mrsh_command_copy(fn_def->body); ret = run_command(ctx, body); mrsh_command_destroy(body); pop_frame(state); } else if (mrsh_has_builtin(argv_0)) { ret = run_builtin(ctx, sc, argc, argv); } else { ret = run_process(ctx, sc, argv); } mrsh_command_destroy(&sc->command); for (size_t i = 0; i < args.len; ++i) { free(args.data[i]); } mrsh_array_finish(&args); return ret; }
4ee21843c1b8fcddf77233fb6b1ad0f08ff33c2e
e65a4dbfbfb0e54e59787ba7741efee12f7687f3
/misc/orville-write/files/patch-mesg.c
00d86b1f997f8212096b919d9c754c0a725719e0
[ "BSD-2-Clause" ]
permissive
freebsd/freebsd-ports
86f2e89d43913412c4f6b2be3e255bc0945eac12
605a2983f245ac63f5420e023e7dce56898ad801
refs/heads/main
2023-08-30T21:46:28.720924
2023-08-30T19:33:44
2023-08-30T19:33:44
1,803,961
916
918
NOASSERTION
2023-09-08T04:06:26
2011-05-26T11:15:35
null
UTF-8
C
false
false
4,882
c
patch-mesg.c
--- mesg.c.orig 2004-09-29 04:43:14 UTC +++ mesg.c @@ -19,7 +19,7 @@ char *mytty; /* my tty name in tty?? format */ long mypos; /* offset of my entry in wrttmp file */ struct wrttmp mywrt; /* my wrttmp entry */ -struct utmp myutmp; /* A tmp buffer for reading utmp entries */ +struct utmpx myutmp; /* A tmp buffer for reading utmp entries */ char silent= FALSE; /* generates no output if true */ int verbose= FALSE; /* generate whole table of output if true */ @@ -335,7 +335,7 @@ char flag; } /* Close the utmp file */ - endutent(); + endutxent(); if (f_wrthist != NULL && !wassilent && (new[SMESG] == 'n' || new[SEXCP] == 'y')) @@ -549,12 +549,12 @@ int code; void do_disconnect() { -struct utmp *ut; /* A tmp buffer for reading utmp entries */ +struct utmpx *ut; /* A tmp buffer for reading utmp entries */ struct wrttmp hiswrt; /* Someone's wrttmp entry */ int slot= 0; /* Rewind utmp file */ - setutent(); + setutxent(); /* For each user who is writing me */ for (;;) @@ -564,16 +564,16 @@ int slot= 0; sizeof(struct wrttmp)) break; - if (!strncmp(hiswrt.wrt_what, myutmp.ut_name, UT_NAMESIZE)) + if (!strncmp(hiswrt.wrt_what, myutmp.ut_user, sizeof(myutmp.ut_user))) { setutent(); /* Check apparant writer against utmp file */ - while ((ut= getutent()) != NULL) + while ((ut= getutxent()) != NULL) if ( #ifdef USER_PROCESS ut->ut_type == USER_PROCESS && #endif - !strncmp(hiswrt.wrt_line, ut->ut_line, UT_LINESIZE)) + !strncmp(hiswrt.wrt_line, ut->ut_line, sizeof(ut->ut_line))) { /* Writer is for real: bonk him one */ kill(hiswrt.wrt_pid, SIGTERM); @@ -590,10 +590,10 @@ int slot= 0; int find_me() { -struct utmp *ut; +struct utmpx *ut; /* Find our entry in the Utmp file */ - if ((ut= find_utmp(mytty)) == NULL || ut->ut_name[0] == '\0') + if ((ut= find_utmp(mytty)) == NULL || ut->ut_user[0] == '\0') { printf("%s: Unable to find your tty (%s) in utmp file\n", progname,mytty); @@ -602,7 +602,7 @@ struct utmp *ut; myutmp= *ut; /* Find the entry in the wrttmp file */ - find_wrttmp(mytty,myutmp.ut_time,&mywrt,&mypos); + find_wrttmp(mytty,myutmp.ut_tv.tv_sec,&mywrt,&mypos); } @@ -616,13 +616,13 @@ int may_help() #define BUFSZ 80 FILE *hfp; char buf[BUFSZ+1]; -char myname[UT_NAMESIZE+2]; +char myname[sizeof(myutmp.ut_user)+1]; if (f_helperlist == NULL || (hfp= fopen(f_helperlist,"r")) == NULL) return TRUE; - strncpy(myname,myutmp.ut_name,UT_NAMESIZE); - myname[UT_NAMESIZE]= '\0'; + strncpy(myname,myutmp.ut_user,sizeof(myutmp.ut_user) -1); + myname[sizeof(myutmp.ut_user)]= '\0'; strcat(myname,"\n"); while (fgets(buf,BUFSZ,hfp) != NULL) @@ -645,7 +645,7 @@ int window_warning(int newmode) { struct wrthist *hist; struct wrttmp w; -struct utmp *u; +struct utmpx *u; long writer, writee; time_t now; int n, foundsome= 0; @@ -669,7 +669,7 @@ FILE *fp; for (writee= 0; writee < n; writee++) { - if (hist[writee].tm > myutmp.ut_time && + if (hist[writee].tm > myutmp.ut_tv.tv_sec && now - hist[writee].tm <= f_answertel) { /* Fetch "his" wrttmp entry - it may actually belong to a previous @@ -688,12 +688,12 @@ FILE *fp; /* Fetch his utmp entry, and confirm that the current user was * already logged in there when we sent our last telegram there. */ - if ((u= find_utmp(w.wrt_line)) == NULL || u->ut_name[0] == '\0' || - hist[writee].tm < u->ut_time) + if ((u= find_utmp(w.wrt_line)) == NULL || u->ut_user[0] == '\0' || + hist[writee].tm < u->ut_tv.tv_sec) continue; /* Check if due to exceptions he may write us anyway */ - if (f_exceptions && newmode > 1 && maywriteme(u->ut_name, newmode)) + if (f_exceptions && newmode > 1 && maywriteme(u->ut_user, newmode)) continue; if (!foundsome) @@ -703,8 +703,8 @@ FILE *fp; foundsome= 1; } printf(" %-*.*s %-*.*s %4.1f more minutes\n", - UT_NAMESIZE, UT_NAMESIZE, u->ut_name, - UT_LINESIZE, UT_LINESIZE, u->ut_line, + sizeof(u->ut_user) -1, sizeof(u->ut_user) -1, u->ut_user, + sizeof(u->ut_line) -1, sizeof(u->ut_line) -1, u->ut_line, (float)(f_answertel - now + hist[writee].tm)/60.0); } } @@ -717,7 +717,7 @@ FILE *fp; char *myhomedir() { -char myname[UT_NAMESIZE+2]; +char myname[sizeof(myutmp.ut_user)+1]; struct passwd *pw; char *dir, *getenv(); @@ -726,8 +726,8 @@ char *dir, *getenv(); return dir; /* If that don't work, try passwd file */ - strncpy(myname,myutmp.ut_name,UT_NAMESIZE); - myname[UT_NAMESIZE]= '\0'; + strncpy(myname,myutmp.ut_user,sizeof(myutmp.ut_user) -1); + myname[sizeof(myutmp.ut_user)]= '\0'; if ((pw= getpwnam(myname)) != NULL) return pw->pw_dir;
0d00262d845bf3b3ba64241632b523f73271d944
a12b448f44beb4d521cb7e31677281f41df35f0b
/3rdParty/isl/test_inputs/codegen/cloog/faber.c
4aef0a51fa196d3dba1bb62f9593a652895e0de1
[ "MIT", "LGPL-2.0-or-later" ]
permissive
Tiramisu-Compiler/tiramisu
d45f65dd9c35f643b3531ec79df1203c7ea3371d
f13e480f0ddb142cec371b7d7431a41d8ca885ec
refs/heads/master
2023-08-25T12:21:26.889736
2023-05-09T18:40:52
2023-05-09T18:40:52
58,378,976
906
168
MIT
2023-09-08T11:47:06
2016-05-09T13:33:51
C++
UTF-8
C
false
false
6,526
c
faber.c
{ for (int c0 = 0; c0 <= 36; c0 += 1) { for (int c1 = -6; c1 < c0 / 14 - 5; c1 += 1) { for (int c2 = -((-2 * c1 + 3) / 5) + 9; c2 <= c1 + 12; c2 += 1) S6(c0, c1, c2); for (int c2 = c1 + 24; c2 <= -2 * c1 + 24; c2 += 1) S2(c0, c1, c2); for (int c2 = -2 * c1 + 30; c2 <= c1 + 48; c2 += 1) S1(c0, c1, c2); } for (int c1 = c0 / 14 - 5; c1 < 0; c1 += 1) { if (c1 >= -3 && 2 * c0 >= 7 * c1 + 42) S7(c0, c1, 6); for (int c2 = max(c1 - (6 * c0 + 77) / 77 + 13, -((-2 * c1 + 3) / 5) + 9); c2 <= c1 + 12; c2 += 1) S6(c0, c1, c2); for (int c2 = c1 - (3 * c0 + 14) / 14 + 49; c2 <= c1 + 48; c2 += 1) S1(c0, c1, c2); } S3(c0, 0, 0); S10(c0, 0, 0); for (int c2 = 1; c2 <= 5; c2 += 1) S3(c0, 0, c2); for (int c2 = 6; c2 <= 2 * c0 / 21 + 4; c2 += 1) { S3(c0, 0, c2); S7(c0, 0, c2); } for (int c2 = max(6, 2 * c0 / 21 + 5); c2 <= -((6 * c0 + 77) / 77) + 12; c2 += 1) S3(c0, 0, c2); for (int c2 = -((6 * c0 + 77) / 77) + 13; c2 <= 12; c2 += 1) { S3(c0, 0, c2); S6(c0, 0, c2); } for (int c2 = 13; c2 <= 24; c2 += 1) S3(c0, 0, c2); for (int c2 = -((3 * c0 + 14) / 14) + 49; c2 <= 48; c2 += 1) S1(c0, 0, c2); for (int c1 = 1; c1 <= 18; c1 += 1) { for (int c2 = -8 * c1; c2 <= min(6, -8 * c1 + 24); c2 += 1) S3(c0, c1, c2); if (c1 == 2) { S3(c0, 2, 7); } else if (c0 <= 34 && c1 == 1) { S3(c0, 1, 7); } else if (c0 >= 35 && c1 == 1) { S3(c0, 1, 7); S7(c0, 1, 7); } for (int c2 = 8; c2 <= min(-8 * c1 + 24, c1 - (6 * c0 + 77) / 77 + 12); c2 += 1) S3(c0, c1, c2); for (int c2 = max(-8 * c1 + 25, c1 - (6 * c0 + 77) / 77 + 13); c2 <= c1 + 12; c2 += 1) S6(c0, c1, c2); if (c1 == 1) { for (int c2 = -((6 * c0 + 77) / 77) + 14; c2 <= 13; c2 += 1) { S3(c0, 1, c2); S6(c0, 1, c2); } for (int c2 = 14; c2 <= 16; c2 += 1) S3(c0, 1, c2); } for (int c2 = c1 - (3 * c0 + 14) / 14 + 49; c2 <= c1 + 48; c2 += 1) S1(c0, c1, c2); } for (int c1 = 19; c1 <= 24; c1 += 1) { for (int c2 = -8 * c1; c2 <= -8 * c1 + 24; c2 += 1) S3(c0, c1, c2); for (int c2 = c1 - (6 * c0 + 77) / 77 + 13; c2 <= 30; c2 += 1) S6(c0, c1, c2); } } for (int c0 = 37; c0 <= 218; c0 += 1) { for (int c1 = (c0 + 5) / 14 - 8; c1 < min(0, c0 / 14 - 5); c1 += 1) { if (c0 <= 46 && c1 == -3) S7(c0, -3, 6); if (77 * c1 + 77 * ((-2 * c1 - 2) / 5) + 524 >= 6 * c0) S6(c0, c1, -((-2 * c1 + 3) / 5) + 9); for (int c2 = c1 + 24; c2 <= -2 * c1 + 24; c2 += 1) S2(c0, c1, c2); for (int c2 = -2 * c1 + 30; c2 <= c1 - (3 * c0 + 17) / 14 + 56; c2 += 1) S1(c0, c1, c2); } for (int c1 = c0 / 14 - 5; c1 < 0; c1 += 1) { if (7 * c1 + 114 >= 2 * c0) S7(c0, c1, 6); for (int c2 = max(8, c1 - (6 * c0 + 77) / 77 + 13); c2 <= c1 - (6 * c0 + 91) / 77 + 15; c2 += 1) S6(c0, c1, c2); for (int c2 = c1 - (3 * c0 + 14) / 14 + 49; c2 <= c1 - (3 * c0 + 17) / 14 + 56; c2 += 1) S1(c0, c1, c2); } if (c0 <= 148) for (int c1 = max(0, (c0 + 5) / 14 - 8); c1 < c0 / 14 - 5; c1 += 1) { if (c1 == 0) S2(c0, 0, 24); for (int c2 = max(c1 + 24, -2 * c1 + 30); c2 <= c1 - (3 * c0 + 17) / 14 + 56; c2 += 1) S1(c0, c1, c2); } if (c0 >= 70 && c0 % 14 >= 9) for (int c2 = max(c0 / 14 + 19, -((3 * c0 + 14) / 14) + c0 / 14 + 44); c2 <= -((3 * c0 + 17) / 14) + c0 / 14 + 51; c2 += 1) S1(c0, c0 / 14 - 5, c2); for (int c1 = max(0, (c0 + 5) / 14 - 5); c1 < c0 / 14 - 2; c1 += 1) { for (int c2 = max(c1, -2 * c1 + 6); c2 <= min(c1 + 5, -2 * c1 + 24); c2 += 1) S9(c0, c1, c2); for (int c2 = c1 + 6; c2 <= min((2 * c1 + 1) / 5 + 7, (2 * c0 - 7 * c1 - 10) / 21 + 1); c2 += 1) S9(c0, c1, c2); for (int c2 = max(c1 + 6, (2 * c0 - 7 * c1 - 10) / 21 + 2); c2 <= (2 * c1 + 1) / 5 + 7; c2 += 1) { S7(c0, c1, c2); S9(c0, c1, c2); } if (c1 <= 3) S9(c0, c1, (2 * c1 + 1) / 5 + 8); for (int c2 = (2 * c1 + 1) / 5 + 9; c2 <= c1 - (6 * c0 + 91) / 77 + 15; c2 += 1) { S6(c0, c1, c2); S9(c0, c1, c2); } for (int c2 = max(max(c1 + 6, c1 - (6 * c0 + 91) / 77 + 16), (2 * c1 + 1) / 5 + 9); c2 <= -2 * c1 + 24; c2 += 1) S9(c0, c1, c2); for (int c2 = max(c1, -2 * c1 + 30); c2 <= min(c1 + 24, c1 - (3 * c0 + 17) / 14 + 47); c2 += 1) S8(c0, c1, c2); for (int c2 = max(c1 + 24, c1 - (3 * c0 + 14) / 14 + 49); c2 <= c1 - (3 * c0 + 17) / 14 + 56; c2 += 1) S1(c0, c1, c2); } for (int c1 = c0 / 14 - 2; c1 <= 18; c1 += 1) { for (int c2 = max(6, (c0 + 5) / 14 + 1); c2 <= min(min(c1, c0 / 14 + 3), -c1 + c1 / 2 + 18); c2 += 1) S5(c0, c1, c2); for (int c2 = max(c1 + (3 * c0 + 3) / 14 - 40, -c1 + (c1 + 1) / 2 + 21); c2 <= min(c1, c1 + 3 * c0 / 14 - 33); c2 += 1) S4(c0, c1, c2); for (int c2 = c1 + 6; c2 <= min((2 * c1 + 1) / 5 + 7, (2 * c0 - 7 * c1 + 63) / 21 + 1); c2 += 1) S7(c0, c1, c2); for (int c2 = max(max(c1 + 6, c1 - (6 * c0 + 77) / 77 + 13), (2 * c1 + 1) / 5 + 9); c2 <= c1 - (6 * c0 + 91) / 77 + 15; c2 += 1) S6(c0, c1, c2); for (int c2 = max(c1, c1 - (3 * c0 + 14) / 14 + 40); c2 <= min(c1 + 24, c1 - (3 * c0 + 17) / 14 + 47); c2 += 1) S8(c0, c1, c2); for (int c2 = max(c1 + 24, c1 - (3 * c0 + 14) / 14 + 49); c2 <= c1 - (3 * c0 + 17) / 14 + 56; c2 += 1) S1(c0, c1, c2); } for (int c1 = 19; c1 <= 24; c1 += 1) { for (int c2 = max(c1 - 12, (c0 + 5) / 14 + 1); c2 <= min(c0 / 14 + 3, -c1 + c1 / 2 + 18); c2 += 1) S5(c0, c1, c2); for (int c2 = max(max(c1 - 12, c1 + (3 * c0 + 3) / 14 - 40), -c1 + (c1 + 1) / 2 + 21); c2 <= min(c1, c1 + 3 * c0 / 14 - 33); c2 += 1) S4(c0, c1, c2); for (int c2 = max(c1 + 6, c1 - (6 * c0 + 77) / 77 + 13); c2 <= min(30, c1 - (6 * c0 + 91) / 77 + 15); c2 += 1) S6(c0, c1, c2); for (int c2 = max(c1, c1 - (3 * c0 + 14) / 14 + 40); c2 <= min(c1 + 24, c1 - (3 * c0 + 17) / 14 + 47); c2 += 1) S8(c0, c1, c2); } for (int c1 = 25; c1 <= min(42, -((3 * c0 + 17) / 14) + 71); c1 += 1) for (int c2 = max(c1 - 12, c1 + (3 * c0 + 3) / 14 - 40); c2 <= min(min(30, c1), c1 + 3 * c0 / 14 - 33); c2 += 1) S4(c0, c1, c2); } }
84cec71dcbbf96dd922c27eb313411f2cd7d7480
d1a6e586e0ad50da88ac3cf176d40bb9facb6bf6
/source/device/opendla/odla_dump.c
763fe949e3d518cf87256ca2e6cca55768e92f52
[ "Apache-2.0" ]
permissive
OAID/Tengine
025d2521040c863300ee08b0800010587b72192b
c73708ceb4322ae7c438e4d468178b737fa44cd0
refs/heads/tengine-lite
2023-09-03T19:15:08.100078
2023-05-18T06:17:39
2023-05-18T06:17:39
115,765,590
5,323
1,216
Apache-2.0
2023-09-05T06:25:47
2017-12-30T01:21:41
C++
UTF-8
C
false
false
18,535
c
odla_dump.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Copyright (c) 2021, Institute of Computing Technology * Author: wanglei21c@mails.ucas.ac.cn */ #include "odla_dump.h" #include "device/device.h" #include "graph/tensor.h" #include "graph/node.h" #include "graph/graph.h" #include "graph/subgraph.h" #include "operator/op.h" #include "utility/log.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #ifdef _MSC_VER #include <windows.h> #else #include <sys/stat.h> #include <sys/time.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #ifdef _MSC_VER #include <windows.h> #else #include <sys/stat.h> #include <sys/time.h> #endif void odla_data_dump(const char* filename, int8_t* data, int w, int h, int c) { #ifdef OPENDLA_LOG_ FILE* fp; fp = fopen(filename, "w"); unsigned int line_stride = w * 8; unsigned int surface_stride = line_stride * h; fprintf(fp, "blobs {\n"); for (int i = 0; i < c; i++) { for (int j = 0; j < h; j++) { for (int k = 0; k < w; k++) { int surface_index = i / 8; fprintf(fp, " double_data: %d\n", data[surface_stride * surface_index + line_stride * j + k + i % 8]); fprintf(stdout, "address: %lx data: %d\n", ((uint64_t)data) + surface_stride * surface_index + line_stride * j + k + i % 8, data[surface_stride * surface_index + line_stride * j + k + i % 8]); } } } fprintf(fp, " shape {\n"); fprintf(fp, " dim: 1\n"); fprintf(fp, " dim: %d\n", c); fprintf(fp, " dim: %d\n", h); fprintf(fp, " dim: %d\n", w); fprintf(fp, " }\n"); fprintf(fp, "}\n"); fclose(fp); #endif } int print_tensor_data_value_odla(FILE* file, const struct tensor* tensor, int offset) { switch (tensor->data_type) { case TENGINE_DT_FP32: { float* base_ptr = (float*)tensor->data; float val = base_ptr[offset]; if (val < 0) fprintf(file, "%.4f ", val); else fprintf(file, " %.4f ", val); break; } // case TENGINE_DT_FP16: // { // fp16_t* base_ptr = (fp16_t*)tensor->data; // fp16_t val = base_ptr[offset]; // // float val_fp32 = fp16_to_fp32(val); // // if (val_fp32 < 0) // fprintf(file, "%.4f ", val_fp32); // else // fprintf(file, " %.4f ", val_fp32); // break; // } case TENGINE_DT_UINT8: { uint8_t* base_ptr = (uint8_t*)tensor->data; uint8_t val = base_ptr[offset]; float scale = tensor->scale; int32_t zero_point = tensor->zero_point; float val_fp32 = (float)((int)val - (int)zero_point) * scale; if (val_fp32 < 0) fprintf(file, "%.4f ", val_fp32); else fprintf(file, " %.4f ", val_fp32); break; } case TENGINE_DT_INT8: { int8_t* base_ptr = (int8_t*)tensor->data; int8_t val = base_ptr[offset]; fprintf(file, "%d ", val); break; } case TENGINE_DT_INT16: { int16_t* base_ptr = (int16_t*)tensor->data; int16_t val = base_ptr[offset]; fprintf(file, "%d ", val); break; } case TENGINE_DT_INT32: { int32_t* base_ptr = (int32_t*)tensor->data; int8_t val = base_ptr[offset]; float scale = tensor->scale; float val_fp32 = (float)val * scale; if (val_fp32 < 0) fprintf(file, "%.6f ", val_fp32); else fprintf(file, " %.6f ", val_fp32); } } return 0; } const char* get_tensor_data_type_string_odla(int data_type) { switch (data_type) { case TENGINE_DT_FP32: return "fp32"; case TENGINE_DT_FP16: return "fp16"; case TENGINE_DT_INT8: return "int8"; case TENGINE_DT_UINT8: return "uint8"; case TENGINE_DT_INT32: return "int32"; case TENGINE_DT_INT16: return "int16"; default: return "unknown"; } } void print_tensor_data_to_file_odla(FILE* file, const struct tensor* tensor) { switch (tensor->dim_num) { case 5: { int dim5 = tensor->dims[0], batch = tensor->dims[1], channel = 0, height = 0, width = 0; if (TENGINE_LAYOUT_NCHW == tensor->layout) { channel = tensor->dims[2]; height = tensor->dims[3]; width = tensor->dims[4]; } if (TENGINE_LAYOUT_NHWC == tensor->layout) { height = tensor->dims[2]; width = tensor->dims[3]; channel = tensor->dims[4]; } if (TENGINE_DT_FP32 == tensor->data_type) { fprintf(file, "Shape is {%d %d %d %d %d}, data type is fp32\n", dim5, batch, channel, height, width); } else { if (TENGINE_DT_FP16 == tensor->data_type) { fprintf(file, "Shape is {%d %d %d %d %d}, data type is fp16, cast to fp32\n", dim5, batch, channel, height, width); } else { const char* type_name = get_tensor_data_type_string_odla(tensor->data_type); fprintf(file, "Shape is {%d %d %d %d %d}, data type is %s, inverse quantization to fp32\n", dim5, batch, channel, height, width, type_name); } } for (int d5 = 0; d5 < dim5; d5++) { fprintf(file, "Dim5 %d:\n", d5); for (int n = 0; n < batch; n++) { fprintf(file, "\tBatch %d:\n", n); for (int ch = 0; ch < channel; ch++) { fprintf(file, "\t\tChannel %d:\n", ch); for (int h = 0; h < height; h++) { fprintf(file, "\t\t\t"); for (int w = 0; w < width; w++) { int offset = 0; if (TENGINE_LAYOUT_NCHW == tensor->layout) { offset += d5 * batch * channel * height * width; offset += n * channel * height * width; offset += ch * height * width; offset += h * width; offset += w; } if (TENGINE_LAYOUT_NHWC == tensor->layout) { offset += d5 * batch * channel * height * width; offset += n * channel * height * width; offset += ch; offset += h * width * channel; offset += w * channel; } print_tensor_data_value_odla(file, tensor, offset); } fprintf(file, "\n"); } fprintf(file, "\n"); } fprintf(file, "\n"); } fprintf(file, "\n"); } break; } case 4: { int batch = tensor->dims[0], channel = 0, height = 0, width = 0; if (TENGINE_LAYOUT_NCHW == tensor->layout) { channel = tensor->dims[1]; height = tensor->dims[2]; width = tensor->dims[3]; } if (TENGINE_LAYOUT_NHWC == tensor->layout) { height = tensor->dims[1]; width = tensor->dims[2]; channel = tensor->dims[3]; } if (TENGINE_DT_FP32 == tensor->data_type) { fprintf(file, "Shape is {%d %d %d %d}, data type is fp32\n", batch, channel, height, width); } else { if (TENGINE_DT_FP16 == tensor->data_type) { fprintf(file, "Shape is {%d %d %d %d}, data type is fp16, cast to fp32\n", batch, channel, height, width); } else { const char* type_name = get_tensor_data_type_string_odla(tensor->data_type); fprintf(file, "Shape is {%d %d %d %d}, data type is %s, inverse quantization to fp32\n", batch, channel, height, width, type_name); } } for (int n = 0; n < batch; n++) { fprintf(file, "Batch %d:\n", n); for (int ch = 0; ch < channel; ch++) { fprintf(file, "\tChannel %d:\n", ch); for (int h = 0; h < height; h++) { fprintf(file, "\t\t"); for (int w = 0; w < width; w++) { int offset = 0; if (TENGINE_LAYOUT_NCHW == tensor->layout) { offset += n * channel * height * width; offset += ch * height * width; offset += h * width; offset += w; } if (TENGINE_LAYOUT_NHWC == tensor->layout) { offset += n * channel * height * width; offset += ch; offset += h * width * channel; offset += w * channel; } print_tensor_data_value_odla(file, tensor, offset); } fprintf(file, "\n"); } fprintf(file, "\n"); } fprintf(file, "\n"); } break; } case 3: { int batch = 0, height = 0, width = 0; if (TENGINE_LAYOUT_NCHW == tensor->layout) { batch = tensor->dims[0]; height = tensor->dims[1]; width = tensor->dims[2]; } if (TENGINE_LAYOUT_NHWC == tensor->layout) { height = tensor->dims[0]; width = tensor->dims[1]; batch = tensor->dims[2]; } if (TENGINE_DT_FP32 == tensor->data_type) { fprintf(file, "Shape is {%d %d %d}, data type is fp32\n", batch, height, width); } else { if (TENGINE_DT_FP16 == tensor->data_type) { fprintf(file, "Shape is {%d %d %d}, data type is fp16, cast to fp32\n", batch, height, width); } else { const char* type_name = get_tensor_data_type_string_odla(tensor->data_type); fprintf(file, "Shape is {%d %d %d}, data type is %s, inverse quantization to fp32\n", batch, height, width, type_name); } } for (int n = 0; n < batch; n++) { for (int h = 0; h < height; h++) { fprintf(file, "Channel %d:\n", h); fprintf(file, "\t"); for (int w = 0; w < width; w++) { int offset = 0; if (TENGINE_LAYOUT_NCHW == tensor->layout) { offset += n * height * width; offset += h * width; offset += w; } if (TENGINE_LAYOUT_NHWC == tensor->layout) { offset += h; offset += n * width * height; offset += w * height; } print_tensor_data_value_odla(file, tensor, offset); } fprintf(file, "\n"); } fprintf(file, "\n"); } break; } case 2: { int batch = 0, width = 0; if (TENGINE_LAYOUT_NCHW == tensor->layout) { batch = tensor->dims[0]; width = tensor->dims[1]; } if (TENGINE_LAYOUT_NHWC == tensor->layout) { batch = tensor->dims[0]; width = tensor->dims[1]; } if (TENGINE_DT_FP32 == tensor->data_type) { fprintf(file, "Shape is {%d %d}, data type is fp32\n", batch, width); } else { if (TENGINE_DT_FP16 == tensor->data_type) { fprintf(file, "Shape is {%d %d}, data type is fp16, cast to fp32\n", batch, width); } else { const char* type_name = get_tensor_data_type_string_odla(tensor->data_type); fprintf(file, "Shape is {%d %d}, data type is %s, inverse quantization to fp32\n", batch, width, type_name); } } for (int n = 0; n < batch; n++) { for (int w = 0; w < width; w++) { int offset = 0; offset += n * width; offset += w; print_tensor_data_value_odla(file, tensor, offset); } fprintf(file, "\n"); } break; } case 1: { int width = tensor->dims[0]; fprintf(file, "Shape is {%d}, data type is fp32\n", width); for (int w = 0; w < width; w++) { print_tensor_data_value_odla(file, tensor, w); } break; } default: printf("Input dimension %d not to be supported.\n", tensor->dim_num); } } char* replace_string_character_odla(char* src_str, char* dst_str, char* target_char, char* replaced_char) { char* p; char* _out = dst_str; char* _str = src_str; char* _src = target_char; char* _dst = replaced_char; size_t src_size = strlen(_src); size_t dst_size = strlen(_dst); size_t len = 0; do { p = strstr(_str, _src); if (p == 0) { strcpy(_out, _str); return dst_str; } len = p - _str; memcpy(_out, _str, len); memcpy(_out + len, _dst, dst_size); _str = p + src_size; _out = _out + len + dst_size; } while (p); return dst_str; } void extract_feature_from_tensor_odla(const char* comment, const char* layer_name, const struct tensor* tensor) { // 1. deal with saving path char save_dir[256] = {'0'}; const char* env_path = getenv(TENGINE_DUMP_DIR); if (NULL != env_path && '\0' != env_path[0] && (256 - 2) > strlen(env_path)) { strcpy(save_dir, env_path); if ('/' != save_dir[strlen(env_path) - 1] && '\\' != save_dir[strlen(env_path) - 1]) { #ifdef _MSC_VER save_dir[strlen(env_path)] = '\\'; save_dir[strlen(env_path) + 1] = 0; #else save_dir[strlen(env_path)] = '/'; save_dir[strlen(env_path) + 1] = 0; #endif } } else { // TLOG_WARNING("Tengine: Env var \"TENGINE_DUMP_DIR\" is too long(%d vs. 254). Using default path.\n", strlen(env_path)); sprintf(save_dir, "./output/"); #ifdef _MSC_VER CreateDirectoryA(save_dir, NULL); #else int ret = mkdir(save_dir, S_IRWXU | S_IRGRP | S_IWGRP | S_IROTH); // if (0 != ret) // { // TLOG_WARNING("Tengine: Create saving folder failed(%d), skip dump.\n", ret); // return; // } #endif } // 2. deal with layer name char layer_short_name[64], layer_legal_name[64]; if (64 < strlen(layer_name)) { memcpy(layer_short_name, layer_name, 64 - 1); layer_short_name[64 - 1] = 0; } else { strcpy(layer_short_name, layer_name); } replace_string_character_odla(layer_short_name, layer_legal_name, "/", "-"); // 3. join path char output_file_path[512] = {'0'}; if (strlen(layer_legal_name) + strlen(save_dir) + strlen(comment) > 256 - 16) { TLOG_WARNING("Tengine: Name of saving file is too long(%d vs. %d), skip dump.\n", strlen(layer_legal_name) + strlen(save_dir) + strlen(comment), 256 - 16); return; } sprintf(output_file_path, "%s%s_%s_blob_data.txt", save_dir, layer_legal_name, comment); FILE* file = fopen(output_file_path, "w"); if (NULL == file) { fprintf(stderr, "Tengine: Open file(%s) failed, skip dump\n", output_file_path); return; } print_tensor_data_to_file_odla(file, tensor); // close file fclose(file); file = NULL; } void dump_sub_graph_odla(struct subgraph* sub_graph) { TLOG_INFO("Sub graph[%d]: {%8s } has %d nodes, %d input tensors, %d output tensors.\n", sub_graph->index, sub_graph->device->name, sub_graph->node_num, sub_graph->input_num, sub_graph->output_num); TLOG_INFO("\tSub nodes: [ "); for (int j = 0; j < sub_graph->node_num - 1; j++) { int node_id = sub_graph->node_list[j]; TLOG_INFO("%d, ", node_id); } TLOG_INFO("%d ].\n", sub_graph->node_list[sub_graph->node_num - 1]); TLOG_INFO("\tSub input tensors: [ "); for (int j = 0; j < sub_graph->input_num - 1; j++) { int tensor_id = sub_graph->input_tensor_list[j]; TLOG_INFO("%d, ", tensor_id); } TLOG_INFO("%d ].\n", sub_graph->input_tensor_list[sub_graph->input_num - 1]); TLOG_INFO("\tSub output tensors: [ "); for (int j = 0; j < sub_graph->output_num - 1; j++) { int tensor_id = sub_graph->output_tensor_list[j]; TLOG_INFO("%d, ", tensor_id); } TLOG_INFO("%d ].\n", sub_graph->output_tensor_list[sub_graph->output_num - 1]); }
7dfdbbeb69432c6adb27ce313a400402b51175ff
aa3befea459382dc5c01c925653d54f435b3fb0f
/boards/arm/stm32l4/nucleo-l496zg/src/stm32_appinitialize.c
b16c6887273fd3af3c4ea56f6039b47c44315c1b
[ "MIT-open-group", "BSD-3-Clause", "HPND-sell-variant", "BSD-4-Clause-UC", "LicenseRef-scancode-warranty-disclaimer", "MIT-0", "LicenseRef-scancode-bsd-atmel", "LicenseRef-scancode-gary-s-brown", "LicenseRef-scancode-proprietary-license", "SunPro", "MIT", "LicenseRef-scancode-public-domain-disclaimer", "LicenseRef-scancode-other-permissive", "HPND", "ISC", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "GPL-1.0-or-later", "CC-BY-2.0", "CC-BY-4.0" ]
permissive
apache/nuttx
14519a7bff4a87935d94fb8fb2b19edb501c7cec
606b6d9310fb25c7d92c6f95bf61737e3c79fa0f
refs/heads/master
2023-08-25T06:55:45.822534
2023-08-23T16:03:31
2023-08-24T21:25:47
228,103,273
407
241
Apache-2.0
2023-09-14T18:26:05
2019-12-14T23:27:55
C
UTF-8
C
false
false
5,888
c
stm32_appinitialize.c
/**************************************************************************** * boards/arm/stm32l4/nucleo-l496zg/src/stm32_appinitialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The * ASF licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. * ****************************************************************************/ /**************************************************************************** * Included Files ****************************************************************************/ #include <nuttx/config.h> #include <sys/types.h> #include <debug.h> #include <syslog.h> #include "nucleo-144.h" #include <nuttx/fs/fs.h> #include <nuttx/leds/userled.h> #include "stm32l4_i2c.h" /**************************************************************************** * Private Data ****************************************************************************/ #if defined(CONFIG_STM32L4_I2C1) struct i2c_master_s *i2c1; #endif #if defined(CONFIG_STM32L4_I2C2) struct i2c_master_s *i2c2; #endif #if defined(CONFIG_STM32L4_I2C3) struct i2c_master_s *i2c3; #endif #if defined(CONFIG_STM32L4_I2C4) struct i2c_master_s *i2c4; #endif /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** * Name: board_app_initialize * * Description: * Perform application specific initialization. This function is never * called directly from application code, but only indirectly via the * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * * Input Parameters: * arg - The boardctl() argument is passed to the board_app_initialize() * implementation without modification. The argument has no * meaning to NuttX; the meaning of the argument is a contract * between the board-specific initialization logic and the * matching application logic. The value could be such things as a * mode enumeration value, a set of DIP switch switch settings, a * pointer to configuration data read from a file or serial FLASH, * or whatever you would like to do with it. Every implementation * should accept zero/NULL as a default configuration. * * Returned Value: * Zero (OK) is returned on success; a negated errno value is returned on * any failure to indicate the nature of the failure. * ****************************************************************************/ int board_app_initialize(uintptr_t arg) { int ret; #ifdef CONFIG_FS_PROCFS /* Mount the procfs file system */ ret = nx_mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL); if (ret < 0) { syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", STM32_PROCFS_MOUNTPOINT, ret); } #endif #if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) /* Register the LED driver */ ret = userled_lower_initialize(LED_DRIVER_PATH); if (ret < 0) { syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); } #endif #ifdef CONFIG_ADC /* Initialize ADC and register the ADC driver. */ ret = stm32_adc_setup(); if (ret < 0) { syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); } #ifdef CONFIG_STM32L4_DFSDM /* Initialize DFSDM and register its filters as additional ADC devices. */ ret = stm32_dfsdm_setup(); if (ret < 0) { syslog(LOG_ERR, "ERROR: stm32_dfsdm_setup failed: %d\n", ret); } #endif #endif /* CONFIG_ADC */ #ifdef CONFIG_DAC /* Initialize DAC and register the DAC driver. */ ret = stm32_dac_setup(); if (ret < 0) { syslog(LOG_ERR, "ERROR: stm32_dac_setup failed: %d\n", ret); } #endif #if defined(CONFIG_FAT_DMAMEMORY) if (stm32_dma_alloc_init() < 0) { syslog(LOG_ERR, "DMA alloc FAILED"); } #endif #if defined(CONFIG_NUCLEO_SPI_TEST) /* Create SPI interfaces */ ret = stm32_spidev_bus_test(); if (ret != OK) { syslog(LOG_ERR, "ERROR: Failed to initialize SPI interfaces: %d\n", ret); return ret; } #endif #if defined(CONFIG_MMCSD) /* Configure SDIO */ /* Initialize the SDIO block driver */ ret = stm32l4_sdio_initialize(); if (ret != OK) { ferr("ERROR: Failed to initialize MMC/SD driver: %d\n", ret); return ret; } #endif #if defined(CONFIG_I2C) /* Configure I2C */ /* REVISIT: this is ugly! */ #if defined(CONFIG_STM32L4_I2C1) i2c1 = stm32l4_i2cbus_initialize(1); #endif #if defined(CONFIG_STM32L4_I2C2) i2c2 = stm32l4_i2cbus_initialize(2); #endif #if defined(CONFIG_STM32L4_I2C3) i2c3 = stm32l4_i2cbus_initialize(3); #endif #if defined(CONFIG_STM32L4_I2C4) i2c4 = stm32l4_i2cbus_initialize(4); #endif #ifdef CONFIG_I2C_DRIVER #if defined(CONFIG_STM32L4_I2C1) i2c_register(i2c1, 1); #endif #if defined(CONFIG_STM32L4_I2C2) i2c_register(i2c2, 2); #endif #if defined(CONFIG_STM32L4_I2C3) i2c_register(i2c3, 3); #endif #if defined(CONFIG_STM32L4_I2C4) i2c_register(i2c4, 4); #endif #endif #endif /* CONFIG_I2C */ UNUSED(ret); return OK; }
9762db2339284f1f4fcc5c84990a1504fb9a7c2e
07327b5e8b2831b12352bf7c6426bfda60129da7
/Include/10.0.16299.0/um/adoint.h
a9a9e1e8745b79b98395ea74b82399942312b326
[]
no_license
tpn/winsdk-10
ca279df0fce03f92036e90fb04196d6282a264b7
9b69fd26ac0c7d0b83d378dba01080e93349c2ed
refs/heads/master
2021-01-10T01:56:18.586459
2018-02-19T21:26:31
2018-02-19T21:29:50
44,352,845
218
432
null
null
null
null
UTF-8
C
false
false
419,590
h
adoint.h
/******************************************************** * * * Copyright (C) Microsoft. All rights reserved. * * * ********************************************************/ //-------------------------------------------------------------------- // File: Microsoft ADO // // @module adoint.h | ADO Interface header // //-------------------------------------------------------------------- // Breaking Change Note: // // The ADO interfaces were originally platform-dependent and not script friendly. ADO interface IID's are reguided // in this header file. Therefore, newly-compiled applications may not run on downlevel OSes, since the new interface // IID's are not available on downlevel OSes. To avoid this compatibility issue, customers can either: // (1) install the KB983246 on all downlevel OSes // (2) Change your target platform to Win7 or below. This will use back the IID defined in Win7 SDK and // they will be compatible for downlevel OSes // #if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_WIN8) // // Application is targetting below Windows 8 #include "adoint_Backcompat.h" // #else // #ifndef ADO_SUPPRESS_MESSAGE #ifdef _MSC_VER #pragma message( "Change your target platform to Windows 7 or below if your application requires backward compatibility for the ADO interface." ) #endif //_MSC_VER #endif // ADO_SUPPRESS_MESSAGE // #ifndef _ADOINT_H_ #define _ADOINT_H_ #ifndef _INC_TCHAR #include <tchar.h> #endif #if (_MSC_VER >= 1100) && defined (__cplusplus) #define DECLSPEC_UUID(x) __declspec(uuid(x)) #else #define DECLSPEC_UUID(x) #endif /* this ALWAYS GENERATED file contains the definitions for the interfaces */ /* File created by MIDL compiler version 8.01.0622 */ /* @@MIDL_FILE_HEADING( ) */ /* verify that the <rpcndr.h> version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 500 #endif /* verify that the <rpcsal.h> version is high enough to compile this file*/ #ifndef __REQUIRED_RPCSAL_H_VERSION__ #define __REQUIRED_RPCSAL_H_VERSION__ 100 #endif #include "rpc.h" #include "rpcndr.h" #ifndef __RPCNDR_H_VERSION__ #error this stub requires an updated version of <rpcndr.h> #endif /* __RPCNDR_H_VERSION__ */ #ifndef __ado10_h__ #define __ado10_h__ #if defined(_MSC_VER) && (_MSC_VER >= 1020) #pragma once #endif /* Forward Declarations */ #ifndef ___ADOCollection_FWD_DEFINED__ #define ___ADOCollection_FWD_DEFINED__ typedef interface _ADOCollection _ADOCollection; #endif /* ___ADOCollection_FWD_DEFINED__ */ #ifndef ___ADODynaCollection_FWD_DEFINED__ #define ___ADODynaCollection_FWD_DEFINED__ typedef interface _ADODynaCollection _ADODynaCollection; #endif /* ___ADODynaCollection_FWD_DEFINED__ */ #ifndef ___ADO_FWD_DEFINED__ #define ___ADO_FWD_DEFINED__ typedef interface _ADO _ADO; #endif /* ___ADO_FWD_DEFINED__ */ #ifndef __Error_FWD_DEFINED__ #define __Error_FWD_DEFINED__ typedef interface ADOError Error; #endif /* __Error_FWD_DEFINED__ */ #ifndef __Errors_FWD_DEFINED__ #define __Errors_FWD_DEFINED__ typedef interface ADOErrors Errors; #endif /* __Errors_FWD_DEFINED__ */ #ifndef __Command15_FWD_DEFINED__ #define __Command15_FWD_DEFINED__ typedef interface Command15 Command15; #endif /* __Command15_FWD_DEFINED__ */ #ifndef __Command25_FWD_DEFINED__ #define __Command25_FWD_DEFINED__ typedef interface Command25 Command25; #endif /* __Command25_FWD_DEFINED__ */ #ifndef ___Command_FWD_DEFINED__ #define ___Command_FWD_DEFINED__ typedef interface _ADOCommand _Command; #endif /* ___Command_FWD_DEFINED__ */ #ifndef __ConnectionEventsVt_FWD_DEFINED__ #define __ConnectionEventsVt_FWD_DEFINED__ typedef interface ConnectionEventsVt ConnectionEventsVt; #endif /* __ConnectionEventsVt_FWD_DEFINED__ */ #ifndef __RecordsetEventsVt_FWD_DEFINED__ #define __RecordsetEventsVt_FWD_DEFINED__ typedef interface RecordsetEventsVt RecordsetEventsVt; #endif /* __RecordsetEventsVt_FWD_DEFINED__ */ #ifndef __ConnectionEvents_FWD_DEFINED__ #define __ConnectionEvents_FWD_DEFINED__ typedef interface ConnectionEvents ConnectionEvents; #endif /* __ConnectionEvents_FWD_DEFINED__ */ #ifndef __RecordsetEvents_FWD_DEFINED__ #define __RecordsetEvents_FWD_DEFINED__ typedef interface RecordsetEvents RecordsetEvents; #endif /* __RecordsetEvents_FWD_DEFINED__ */ #ifndef __Connection15_FWD_DEFINED__ #define __Connection15_FWD_DEFINED__ typedef interface Connection15 Connection15; #endif /* __Connection15_FWD_DEFINED__ */ #ifndef ___Connection_FWD_DEFINED__ #define ___Connection_FWD_DEFINED__ typedef interface _ADOConnection _Connection; #endif /* ___Connection_FWD_DEFINED__ */ #ifndef __ADOConnectionConstruction15_FWD_DEFINED__ #define __ADOConnectionConstruction15_FWD_DEFINED__ typedef interface ADOConnectionConstruction15 ADOConnectionConstruction15; #endif /* __ADOConnectionConstruction15_FWD_DEFINED__ */ #ifndef __ADOConnectionConstruction_FWD_DEFINED__ #define __ADOConnectionConstruction_FWD_DEFINED__ typedef interface ADOConnectionConstruction ADOConnectionConstruction; #endif /* __ADOConnectionConstruction_FWD_DEFINED__ */ #ifndef __Connection_FWD_DEFINED__ #define __Connection_FWD_DEFINED__ #ifdef __cplusplus typedef class ADOConnection Connection; #else typedef struct ADOConnection Connection; #endif /* __cplusplus */ #endif /* __Connection_FWD_DEFINED__ */ #ifndef ___Record_FWD_DEFINED__ #define ___Record_FWD_DEFINED__ typedef interface _ADORecord _Record; #endif /* ___Record_FWD_DEFINED__ */ #ifndef __Record_FWD_DEFINED__ #define __Record_FWD_DEFINED__ #ifdef __cplusplus typedef class ADORecord Record; #else typedef struct ADORecord Record; #endif /* __cplusplus */ #endif /* __Record_FWD_DEFINED__ */ #ifndef ___Stream_FWD_DEFINED__ #define ___Stream_FWD_DEFINED__ typedef interface _ADOStream _Stream; #endif /* ___Stream_FWD_DEFINED__ */ #ifndef __Stream_FWD_DEFINED__ #define __Stream_FWD_DEFINED__ #ifdef __cplusplus typedef class ADOStream Stream; #else typedef struct ADOStream Stream; #endif /* __cplusplus */ #endif /* __Stream_FWD_DEFINED__ */ #ifndef __ADORecordConstruction_FWD_DEFINED__ #define __ADORecordConstruction_FWD_DEFINED__ typedef interface ADORecordConstruction ADORecordConstruction; #endif /* __ADORecordConstruction_FWD_DEFINED__ */ #ifndef __ADOStreamConstruction_FWD_DEFINED__ #define __ADOStreamConstruction_FWD_DEFINED__ typedef interface ADOStreamConstruction ADOStreamConstruction; #endif /* __ADOStreamConstruction_FWD_DEFINED__ */ #ifndef __ADOCommandConstruction_FWD_DEFINED__ #define __ADOCommandConstruction_FWD_DEFINED__ typedef interface ADOCommandConstruction ADOCommandConstruction; #endif /* __ADOCommandConstruction_FWD_DEFINED__ */ #ifndef __Command_FWD_DEFINED__ #define __Command_FWD_DEFINED__ #ifdef __cplusplus typedef class ADOCommand Command; #else typedef struct ADOCommand Command; #endif /* __cplusplus */ #endif /* __Command_FWD_DEFINED__ */ #ifndef __Recordset_FWD_DEFINED__ #define __Recordset_FWD_DEFINED__ #ifdef __cplusplus typedef class ADORecordset Recordset; #else typedef struct ADORecordset Recordset; #endif /* __cplusplus */ #endif /* __Recordset_FWD_DEFINED__ */ #ifndef __Recordset15_FWD_DEFINED__ #define __Recordset15_FWD_DEFINED__ typedef interface Recordset15 Recordset15; #endif /* __Recordset15_FWD_DEFINED__ */ #ifndef __Recordset20_FWD_DEFINED__ #define __Recordset20_FWD_DEFINED__ typedef interface Recordset20 Recordset20; #endif /* __Recordset20_FWD_DEFINED__ */ #ifndef __Recordset21_FWD_DEFINED__ #define __Recordset21_FWD_DEFINED__ typedef interface Recordset21 Recordset21; #endif /* __Recordset21_FWD_DEFINED__ */ #ifndef ___Recordset_FWD_DEFINED__ #define ___Recordset_FWD_DEFINED__ typedef interface _ADORecordset _Recordset; #endif /* ___Recordset_FWD_DEFINED__ */ #ifndef __ADORecordsetConstruction_FWD_DEFINED__ #define __ADORecordsetConstruction_FWD_DEFINED__ typedef interface ADORecordsetConstruction ADORecordsetConstruction; #endif /* __ADORecordsetConstruction_FWD_DEFINED__ */ #ifndef __Field15_FWD_DEFINED__ #define __Field15_FWD_DEFINED__ typedef interface Field15 Field15; #endif /* __Field15_FWD_DEFINED__ */ #ifndef __Field20_FWD_DEFINED__ #define __Field20_FWD_DEFINED__ typedef interface Field20 Field20; #endif /* __Field20_FWD_DEFINED__ */ #ifndef __Field_FWD_DEFINED__ #define __Field_FWD_DEFINED__ typedef interface ADOField Field; #endif /* __Field_FWD_DEFINED__ */ #ifndef __Fields15_FWD_DEFINED__ #define __Fields15_FWD_DEFINED__ typedef interface Fields15 Fields15; #endif /* __Fields15_FWD_DEFINED__ */ #ifndef __Fields20_FWD_DEFINED__ #define __Fields20_FWD_DEFINED__ typedef interface Fields20 Fields20; #endif /* __Fields20_FWD_DEFINED__ */ #ifndef __Fields_FWD_DEFINED__ #define __Fields_FWD_DEFINED__ typedef interface ADOFields Fields; #endif /* __Fields_FWD_DEFINED__ */ #ifndef ___Parameter_FWD_DEFINED__ #define ___Parameter_FWD_DEFINED__ typedef interface _ADOParameter _Parameter; #endif /* ___Parameter_FWD_DEFINED__ */ #ifndef __Parameter_FWD_DEFINED__ #define __Parameter_FWD_DEFINED__ #ifdef __cplusplus typedef class ADOParameter Parameter; #else typedef struct ADOParameter Parameter; #endif /* __cplusplus */ #endif /* __Parameter_FWD_DEFINED__ */ #ifndef __Parameters_FWD_DEFINED__ #define __Parameters_FWD_DEFINED__ typedef interface ADOParameters Parameters; #endif /* __Parameters_FWD_DEFINED__ */ #ifndef __Property_FWD_DEFINED__ #define __Property_FWD_DEFINED__ typedef interface ADOProperty Property; #endif /* __Property_FWD_DEFINED__ */ #ifndef __Properties_FWD_DEFINED__ #define __Properties_FWD_DEFINED__ typedef interface ADOProperties Properties; #endif /* __Properties_FWD_DEFINED__ */ #ifdef __cplusplus extern "C"{ #endif /* interface __MIDL_itf_ado10_0000_0000 */ /* [local] */ #if 0 typedef /* [uuid][public] */ DECLSPEC_UUID("54D8B4B9-663B-4a9c-95F6-0E749ABD70F1") __int64 ADO_LONGPTR; typedef /* [uuid][hidden][public] */ DECLSPEC_UUID("54D8B4B9-663B-4a9c-95F6-0E749ABD70F1") long ADO_LONGPTR; #endif #ifdef _WIN64 // Number of rows typedef LONGLONG ADO_LONGPTR; #else // Number of rows typedef LONG ADO_LONGPTR; #endif // _WIN64 extern RPC_IF_HANDLE __MIDL_itf_ado10_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_ado10_0000_0000_v0_0_s_ifspec; #ifndef __ADODB_LIBRARY_DEFINED__ #define __ADODB_LIBRARY_DEFINED__ /* library ADODB */ /* [helpstring][version][uuid] */ typedef /* [uuid][helpcontext][public] */ DECLSPEC_UUID("0000051B-0000-0010-8000-00AA006D2EA4") enum CursorTypeEnum { adOpenUnspecified = -1, adOpenForwardOnly = 0, adOpenKeyset = 1, adOpenDynamic = 2, adOpenStatic = 3 } CursorTypeEnum; typedef /* [uuid][helpcontext] */ DECLSPEC_UUID("0000051C-0000-0010-8000-00AA006D2EA4") enum CursorOptionEnum { adHoldRecords = 0x100, adMovePrevious = 0x200, adAddNew = 0x1000400, adDelete = 0x1000800, adUpdate = 0x1008000, adBookmark = 0x2000, adApproxPosition = 0x4000, adUpdateBatch = 0x10000, adResync = 0x20000, adNotify = 0x40000, adFind = 0x80000, adSeek = 0x400000, adIndex = 0x800000 } CursorOptionEnum; typedef /* [uuid][helpcontext] */ DECLSPEC_UUID("0000051D-0000-0010-8000-00AA006D2EA4") enum LockTypeEnum { adLockUnspecified = -1, adLockReadOnly = 1, adLockPessimistic = 2, adLockOptimistic = 3, adLockBatchOptimistic = 4 } LockTypeEnum; typedef /* [uuid][helpcontext] */ DECLSPEC_UUID("0000051E-0000-0010-8000-00AA006D2EA4") enum ExecuteOptionEnum { adOptionUnspecified = -1, adAsyncExecute = 0x10, adAsyncFetch = 0x20, adAsyncFetchNonBlocking = 0x40, adExecuteNoRecords = 0x80, adExecuteStream = 0x400, adExecuteRecord = 0x800 } ExecuteOptionEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000541-0000-0010-8000-00AA006D2EA4") enum ConnectOptionEnum { adConnectUnspecified = -1, adAsyncConnect = 0x10 } ConnectOptionEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000532-0000-0010-8000-00AA006D2EA4") enum ObjectStateEnum { adStateClosed = 0, adStateOpen = 0x1, adStateConnecting = 0x2, adStateExecuting = 0x4, adStateFetching = 0x8 } ObjectStateEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000052F-0000-0010-8000-00AA006D2EA4") enum CursorLocationEnum { adUseNone = 1, adUseServer = 2, adUseClient = 3, adUseClientBatch = 3 } CursorLocationEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000051F-0000-0010-8000-00AA006D2EA4") enum DataTypeEnum { adEmpty = 0, adTinyInt = 16, adSmallInt = 2, adInteger = 3, adBigInt = 20, adUnsignedTinyInt = 17, adUnsignedSmallInt = 18, adUnsignedInt = 19, adUnsignedBigInt = 21, adSingle = 4, adDouble = 5, adCurrency = 6, adDecimal = 14, adNumeric = 131, adBoolean = 11, adError = 10, adUserDefined = 132, adVariant = 12, adIDispatch = 9, adIUnknown = 13, adGUID = 72, adDate = 7, adDBDate = 133, adDBTime = 134, adDBTimeStamp = 135, adBSTR = 8, adChar = 129, adVarChar = 200, adLongVarChar = 201, adWChar = 130, adVarWChar = 202, adLongVarWChar = 203, adBinary = 128, adVarBinary = 204, adLongVarBinary = 205, adChapter = 136, adFileTime = 64, adPropVariant = 138, adVarNumeric = 139, adArray = 0x2000 } DataTypeEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000525-0000-0010-8000-00AA006D2EA4") enum FieldAttributeEnum { adFldUnspecified = -1, adFldMayDefer = 0x2, adFldUpdatable = 0x4, adFldUnknownUpdatable = 0x8, adFldFixed = 0x10, adFldIsNullable = 0x20, adFldMayBeNull = 0x40, adFldLong = 0x80, adFldRowID = 0x100, adFldRowVersion = 0x200, adFldCacheDeferred = 0x1000, adFldIsChapter = 0x2000, adFldNegativeScale = 0x4000, adFldKeyColumn = 0x8000, adFldIsRowURL = 0x10000, adFldIsDefaultStream = 0x20000, adFldIsCollection = 0x40000 } FieldAttributeEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000526-0000-0010-8000-00AA006D2EA4") enum EditModeEnum { adEditNone = 0, adEditInProgress = 0x1, adEditAdd = 0x2, adEditDelete = 0x4 } EditModeEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000527-0000-0010-8000-00AA006D2EA4") enum RecordStatusEnum { adRecOK = 0, adRecNew = 0x1, adRecModified = 0x2, adRecDeleted = 0x4, adRecUnmodified = 0x8, adRecInvalid = 0x10, adRecMultipleChanges = 0x40, adRecPendingChanges = 0x80, adRecCanceled = 0x100, adRecCantRelease = 0x400, adRecConcurrencyViolation = 0x800, adRecIntegrityViolation = 0x1000, adRecMaxChangesExceeded = 0x2000, adRecObjectOpen = 0x4000, adRecOutOfMemory = 0x8000, adRecPermissionDenied = 0x10000, adRecSchemaViolation = 0x20000, adRecDBDeleted = 0x40000 } RecordStatusEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000542-0000-0010-8000-00AA006D2EA4") enum GetRowsOptionEnum { adGetRowsRest = -1 } GetRowsOptionEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000528-0000-0010-8000-00AA006D2EA4") enum PositionEnum { adPosUnknown = -1, adPosBOF = -2, adPosEOF = -3 } PositionEnum; typedef /* [helpcontext] */ enum BookmarkEnum { adBookmarkCurrent = 0, adBookmarkFirst = 1, adBookmarkLast = 2 } BookmarkEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000540-0000-0010-8000-00AA006D2EA4") enum MarshalOptionsEnum { adMarshalAll = 0, adMarshalModifiedOnly = 1 } MarshalOptionsEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000543-0000-0010-8000-00AA006D2EA4") enum AffectEnum { adAffectCurrent = 1, adAffectGroup = 2, adAffectAll = 3, adAffectAllChapters = 4 } AffectEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000544-0000-0010-8000-00AA006D2EA4") enum ResyncEnum { adResyncUnderlyingValues = 1, adResyncAllValues = 2 } ResyncEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000545-0000-0010-8000-00AA006D2EA4") enum CompareEnum { adCompareLessThan = 0, adCompareEqual = 1, adCompareGreaterThan = 2, adCompareNotEqual = 3, adCompareNotComparable = 4 } CompareEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000546-0000-0010-8000-00AA006D2EA4") enum FilterGroupEnum { adFilterNone = 0, adFilterPendingRecords = 1, adFilterAffectedRecords = 2, adFilterFetchedRecords = 3, adFilterPredicate = 4, adFilterConflictingRecords = 5 } FilterGroupEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000547-0000-0010-8000-00AA006D2EA4") enum SearchDirectionEnum { adSearchForward = 1, adSearchBackward = -1 } SearchDirectionEnum; typedef /* [hidden] */ SearchDirectionEnum SearchDirection; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000548-0000-0010-8000-00AA006D2EA4") enum PersistFormatEnum { adPersistADTG = 0, adPersistXML = 1 } PersistFormatEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000549-0000-0010-8000-00AA006D2EA4") enum StringFormatEnum { adClipString = 2 } StringFormatEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000520-0000-0010-8000-00AA006D2EA4") enum ConnectPromptEnum { adPromptAlways = 1, adPromptComplete = 2, adPromptCompleteRequired = 3, adPromptNever = 4 } ConnectPromptEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000521-0000-0010-8000-00AA006D2EA4") enum ConnectModeEnum { adModeUnknown = 0, adModeRead = 1, adModeWrite = 2, adModeReadWrite = 3, adModeShareDenyRead = 4, adModeShareDenyWrite = 8, adModeShareExclusive = 0xc, adModeShareDenyNone = 0x10, adModeRecursive = 0x400000 } ConnectModeEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000570-0000-0010-8000-00AA006D2EA4") enum RecordCreateOptionsEnum { adCreateCollection = 0x2000, adCreateStructDoc = 0x80000000, adCreateNonCollection = 0, adOpenIfExists = 0x2000000, adCreateOverwrite = 0x4000000, adFailIfNotExists = -1 } RecordCreateOptionsEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000571-0000-0010-8000-00AA006D2EA4") enum RecordOpenOptionsEnum { adOpenRecordUnspecified = -1, adOpenSource = 0x800000, adOpenOutput = 0x800000, adOpenAsync = 0x1000, adDelayFetchStream = 0x4000, adDelayFetchFields = 0x8000, adOpenExecuteCommand = 0x10000 } RecordOpenOptionsEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000523-0000-0010-8000-00AA006D2EA4") enum IsolationLevelEnum { adXactUnspecified = 0xffffffff, adXactChaos = 0x10, adXactReadUncommitted = 0x100, adXactBrowse = 0x100, adXactCursorStability = 0x1000, adXactReadCommitted = 0x1000, adXactRepeatableRead = 0x10000, adXactSerializable = 0x100000, adXactIsolated = 0x100000 } IsolationLevelEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000524-0000-0010-8000-00AA006D2EA4") enum XactAttributeEnum { adXactCommitRetaining = 0x20000, adXactAbortRetaining = 0x40000, adXactAsyncPhaseOne = 0x80000, adXactSyncPhaseOne = 0x100000 } XactAttributeEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000529-0000-0010-8000-00AA006D2EA4") enum PropertyAttributesEnum { adPropNotSupported = 0, adPropRequired = 0x1, adPropOptional = 0x2, adPropRead = 0x200, adPropWrite = 0x400 } PropertyAttributesEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000052A-0000-0010-8000-00AA006D2EA4") enum ErrorValueEnum { adErrProviderFailed = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xbb8), adErrInvalidArgument = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xbb9), adErrOpeningFile = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xbba), adErrReadFile = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xbbb), adErrWriteFile = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xbbc), adErrNoCurrentRecord = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xbcd), adErrIllegalOperation = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xc93), adErrCantChangeProvider = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xc94), adErrInTransaction = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xcae), adErrFeatureNotAvailable = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xcb3), adErrItemNotFound = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xcc1), adErrObjectInCollection = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xd27), adErrObjectNotSet = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xd5c), adErrDataConversion = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xd5d), adErrObjectClosed = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe78), adErrObjectOpen = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe79), adErrProviderNotFound = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe7a), adErrBoundToCommand = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe7b), adErrInvalidParamInfo = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe7c), adErrInvalidConnection = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe7d), adErrNotReentrant = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe7e), adErrStillExecuting = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe7f), adErrOperationCancelled = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe80), adErrStillConnecting = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe81), adErrInvalidTransaction = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe82), adErrNotExecuting = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe83), adErrUnsafeOperation = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe84), adwrnSecurityDialog = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe85), adwrnSecurityDialogHeader = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe86), adErrIntegrityViolation = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe87), adErrPermissionDenied = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe88), adErrDataOverflow = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe89), adErrSchemaViolation = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe8a), adErrSignMismatch = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe8b), adErrCantConvertvalue = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe8c), adErrCantCreate = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe8d), adErrColumnNotOnThisRow = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe8e), adErrURLDoesNotExist = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe8f), adErrTreePermissionDenied = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe90), adErrInvalidURL = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe91), adErrResourceLocked = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe92), adErrResourceExists = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe93), adErrCannotComplete = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe94), adErrVolumeNotFound = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe95), adErrOutOfSpace = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe96), adErrResourceOutOfScope = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe97), adErrUnavailable = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe98), adErrURLNamedRowDoesNotExist = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe99), adErrDelResOutOfScope = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe9a), adErrPropInvalidColumn = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe9b), adErrPropInvalidOption = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe9c), adErrPropInvalidValue = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe9d), adErrPropConflicting = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe9e), adErrPropNotAllSettable = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xe9f), adErrPropNotSet = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xea0), adErrPropNotSettable = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xea1), adErrPropNotSupported = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xea2), adErrCatalogNotSet = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xea3), adErrCantChangeConnection = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xea4), adErrFieldsUpdateFailed = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xea5), adErrDenyNotSupported = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xea6), adErrDenyTypeNotSupported = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xea7), adErrProviderNotSpecified = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xea9), adErrConnectionStringTooLong = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_CONTROL, 0xeaa) } ErrorValueEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000052B-0000-0010-8000-00AA006D2EA4") enum ParameterAttributesEnum { adParamSigned = 0x10, adParamNullable = 0x40, adParamLong = 0x80 } ParameterAttributesEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000052C-0000-0010-8000-00AA006D2EA4") enum ParameterDirectionEnum { adParamUnknown = 0, adParamInput = 0x1, adParamOutput = 0x2, adParamInputOutput = 0x3, adParamReturnValue = 0x4 } ParameterDirectionEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000052E-0000-0010-8000-00AA006D2EA4") enum CommandTypeEnum { adCmdUnspecified = -1, adCmdUnknown = 0x8, adCmdText = 0x1, adCmdTable = 0x2, adCmdStoredProc = 0x4, adCmdFile = 0x100, adCmdTableDirect = 0x200 } CommandTypeEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000530-0000-0010-8000-00AA006D2EA4") enum EventStatusEnum { adStatusOK = 0x1, adStatusErrorsOccurred = 0x2, adStatusCantDeny = 0x3, adStatusCancel = 0x4, adStatusUnwantedEvent = 0x5 } EventStatusEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000531-0000-0010-8000-00AA006D2EA4") enum EventReasonEnum { adRsnAddNew = 1, adRsnDelete = 2, adRsnUpdate = 3, adRsnUndoUpdate = 4, adRsnUndoAddNew = 5, adRsnUndoDelete = 6, adRsnRequery = 7, adRsnResynch = 8, adRsnClose = 9, adRsnMove = 10, adRsnFirstChange = 11, adRsnMoveFirst = 12, adRsnMoveNext = 13, adRsnMovePrevious = 14, adRsnMoveLast = 15 } EventReasonEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000533-0000-0010-8000-00AA006D2EA4") enum SchemaEnum { adSchemaProviderSpecific = -1, adSchemaAsserts = 0, adSchemaCatalogs = 1, adSchemaCharacterSets = 2, adSchemaCollations = 3, adSchemaColumns = 4, adSchemaCheckConstraints = 5, adSchemaConstraintColumnUsage = 6, adSchemaConstraintTableUsage = 7, adSchemaKeyColumnUsage = 8, adSchemaReferentialContraints = 9, adSchemaReferentialConstraints = 9, adSchemaTableConstraints = 10, adSchemaColumnsDomainUsage = 11, adSchemaIndexes = 12, adSchemaColumnPrivileges = 13, adSchemaTablePrivileges = 14, adSchemaUsagePrivileges = 15, adSchemaProcedures = 16, adSchemaSchemata = 17, adSchemaSQLLanguages = 18, adSchemaStatistics = 19, adSchemaTables = 20, adSchemaTranslations = 21, adSchemaProviderTypes = 22, adSchemaViews = 23, adSchemaViewColumnUsage = 24, adSchemaViewTableUsage = 25, adSchemaProcedureParameters = 26, adSchemaForeignKeys = 27, adSchemaPrimaryKeys = 28, adSchemaProcedureColumns = 29, adSchemaDBInfoKeywords = 30, adSchemaDBInfoLiterals = 31, adSchemaCubes = 32, adSchemaDimensions = 33, adSchemaHierarchies = 34, adSchemaLevels = 35, adSchemaMeasures = 36, adSchemaProperties = 37, adSchemaMembers = 38, adSchemaTrustees = 39, adSchemaFunctions = 40, adSchemaActions = 41, adSchemaCommands = 42, adSchemaSets = 43 } SchemaEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000057E-0000-0010-8000-00AA006D2EA4") enum FieldStatusEnum { adFieldOK = 0, adFieldCantConvertValue = 2, adFieldIsNull = 3, adFieldTruncated = 4, adFieldSignMismatch = 5, adFieldDataOverflow = 6, adFieldCantCreate = 7, adFieldUnavailable = 8, adFieldPermissionDenied = 9, adFieldIntegrityViolation = 10, adFieldSchemaViolation = 11, adFieldBadStatus = 12, adFieldDefault = 13, adFieldIgnore = 15, adFieldDoesNotExist = 16, adFieldInvalidURL = 17, adFieldResourceLocked = 18, adFieldResourceExists = 19, adFieldCannotComplete = 20, adFieldVolumeNotFound = 21, adFieldOutOfSpace = 22, adFieldCannotDeleteSource = 23, adFieldReadOnly = 24, adFieldResourceOutOfScope = 25, adFieldAlreadyExists = 26, adFieldPendingInsert = 0x10000, adFieldPendingDelete = 0x20000, adFieldPendingChange = 0x40000, adFieldPendingUnknown = 0x80000, adFieldPendingUnknownDelete = 0x100000 } FieldStatusEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000552-0000-0010-8000-00AA006D2EA4") enum SeekEnum { adSeekFirstEQ = 0x1, adSeekLastEQ = 0x2, adSeekAfterEQ = 0x4, adSeekAfter = 0x8, adSeekBeforeEQ = 0x10, adSeekBefore = 0x20 } SeekEnum; #ifndef _COMMON_ADC_AND_ADO_PROPS_ #define _COMMON_ADC_AND_ADO_PROPS_ typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000054A-0000-0010-8000-00AA006D2EA4") enum ADCPROP_UPDATECRITERIA_ENUM { adCriteriaKey = 0, adCriteriaAllCols = 1, adCriteriaUpdCols = 2, adCriteriaTimeStamp = 3 } ADCPROP_UPDATECRITERIA_ENUM; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000054B-0000-0010-8000-00AA006D2EA4") enum ADCPROP_ASYNCTHREADPRIORITY_ENUM { adPriorityLowest = 1, adPriorityBelowNormal = 2, adPriorityNormal = 3, adPriorityAboveNormal = 4, adPriorityHighest = 5 } ADCPROP_ASYNCTHREADPRIORITY_ENUM; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000554-0000-0010-8000-00AA006D2EA4") enum ADCPROP_AUTORECALC_ENUM { adRecalcUpFront = 0, adRecalcAlways = 1 } ADCPROP_AUTORECALC_ENUM; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000553-0000-0010-8000-00AA006D2EA4") enum ADCPROP_UPDATERESYNC_ENUM { adResyncNone = 0, adResyncAutoIncrement = 1, adResyncConflicts = 2, adResyncUpdates = 4, adResyncInserts = 8, adResyncAll = 15 } ADCPROP_UPDATERESYNC_ENUM; #endif /* _COMMON_ADC_AND_ADO_PROPS_ */ typedef ADCPROP_UPDATERESYNC_ENUM CEResyncEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000573-0000-0010-8000-00AA006D2EA4") enum MoveRecordOptionsEnum { adMoveUnspecified = -1, adMoveOverWrite = 1, adMoveDontUpdateLinks = 2, adMoveAllowEmulation = 4 } MoveRecordOptionsEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000574-0000-0010-8000-00AA006D2EA4") enum CopyRecordOptionsEnum { adCopyUnspecified = -1, adCopyOverWrite = 1, adCopyAllowEmulation = 4, adCopyNonRecursive = 2 } CopyRecordOptionsEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000576-0000-0010-8000-00AA006D2EA4") enum StreamTypeEnum { adTypeBinary = 1, adTypeText = 2 } StreamTypeEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("00000577-0000-0010-8000-00AA006D2EA4") enum LineSeparatorEnum { adLF = 10, adCR = 13, adCRLF = -1 } LineSeparatorEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000057A-0000-0010-8000-00AA006D2EA4") enum StreamOpenOptionsEnum { adOpenStreamUnspecified = -1, adOpenStreamAsync = 1, adOpenStreamFromRecord = 4 } StreamOpenOptionsEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000057B-0000-0010-8000-00AA006D2EA4") enum StreamWriteEnum { adWriteChar = 0, adWriteLine = 1, stWriteChar = 0, stWriteLine = 1 } StreamWriteEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000057C-0000-0010-8000-00AA006D2EA4") enum SaveOptionsEnum { adSaveCreateNotExist = 1, adSaveCreateOverWrite = 2 } SaveOptionsEnum; typedef /* [helpcontext] */ enum FieldEnum { adDefaultStream = -1, adRecordURL = -2 } FieldEnum; typedef /* [helpcontext] */ enum StreamReadEnum { adReadAll = -1, adReadLine = -2 } StreamReadEnum; typedef /* [helpcontext][uuid] */ DECLSPEC_UUID("0000057D-0000-0010-8000-00AA006D2EA4") enum RecordTypeEnum { adSimpleRecord = 0, adCollectionRecord = 1, adStructDoc = 2 } RecordTypeEnum; EXTERN_C const IID LIBID_ADODB; #ifndef ___ADOCollection_INTERFACE_DEFINED__ #define ___ADOCollection_INTERFACE_DEFINED__ /* interface _ADOCollection */ /* [object][uuid][nonextensible][dual] */ EXTERN_C const IID IID__ADOCollection; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000512-0000-0010-8000-00AA006D2EA4") _ADOCollection : public IDispatch { public: virtual /* [id][helpcontext][propget] */ HRESULT STDMETHODCALLTYPE get_Count( /* [retval][out] */ __RPC__out long *c) = 0; virtual /* [id][restricted] */ HRESULT STDMETHODCALLTYPE _NewEnum( /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppvObject) = 0; virtual /* [id][helpcontext] */ HRESULT STDMETHODCALLTYPE Refresh( void) = 0; }; #else /* C style interface */ typedef struct _ADOCollectionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in _ADOCollection * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in _ADOCollection * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in _ADOCollection * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in _ADOCollection * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in _ADOCollection * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in _ADOCollection * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( _ADOCollection * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [id][helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( __RPC__in _ADOCollection * This, /* [retval][out] */ __RPC__out long *c); /* [id][restricted] */ HRESULT ( STDMETHODCALLTYPE *_NewEnum )( __RPC__in _ADOCollection * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppvObject); /* [id][helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Refresh )( __RPC__in _ADOCollection * This); END_INTERFACE } _ADOCollectionVtbl; interface _ADOCollection { CONST_VTBL struct _ADOCollectionVtbl *lpVtbl; }; #ifdef COBJMACROS #define _ADOCollection_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _ADOCollection_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define _ADOCollection_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define _ADOCollection_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _ADOCollection_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _ADOCollection_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _ADOCollection_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _Collection_get_Count(This,c) \ ( (This)->lpVtbl -> get_Count(This,c) ) #define _ADOCollection__NewEnum(This,ppvObject) \ ( (This)->lpVtbl -> _NewEnum(This,ppvObject) ) #define _ADOCollection_Refresh(This) \ ( (This)->lpVtbl -> Refresh(This) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* ___ADOCollection_INTERFACE_DEFINED__ */ #ifndef ___ADODynaCollection_INTERFACE_DEFINED__ #define ___ADODynaCollection_INTERFACE_DEFINED__ /* interface _ADODynaCollection */ /* [object][uuid][nonextensible][dual] */ EXTERN_C const IID IID__ADODynaCollection; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000513-0000-0010-8000-00AA006D2EA4") _ADODynaCollection : public _ADOCollection { public: virtual /* [helpcontext] */ HRESULT STDMETHODCALLTYPE Append( /* [in] */ __RPC__in_opt IDispatch *Object) = 0; virtual /* [helpcontext] */ HRESULT STDMETHODCALLTYPE Delete( /* [in] */ VARIANT Index) = 0; }; #else /* C style interface */ typedef struct _ADODynaCollectionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in _ADODynaCollection * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in _ADODynaCollection * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in _ADODynaCollection * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in _ADODynaCollection * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in _ADODynaCollection * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in _ADODynaCollection * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( _ADODynaCollection * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [id][helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( __RPC__in _ADODynaCollection * This, /* [retval][out] */ __RPC__out long *c); /* [id][restricted] */ HRESULT ( STDMETHODCALLTYPE *_NewEnum )( __RPC__in _ADODynaCollection * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppvObject); /* [id][helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Refresh )( __RPC__in _ADODynaCollection * This); /* [helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Append )( __RPC__in _ADODynaCollection * This, /* [in] */ __RPC__in_opt IDispatch *Object); /* [helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Delete )( __RPC__in _ADODynaCollection * This, /* [in] */ VARIANT Index); END_INTERFACE } _ADODynaCollectionVtbl; interface _ADODynaCollection { CONST_VTBL struct _ADODynaCollectionVtbl *lpVtbl; }; #ifdef COBJMACROS #define _ADODynaCollection_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _ADODynaCollection_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define _ADODynaCollection_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define _ADODynaCollection_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _ADODynaCollection_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _ADODynaCollection_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _ADODynaCollection_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _DynaCollection_get_Count(This,c) \ ( (This)->lpVtbl -> get_Count(This,c) ) #define _ADODynaCollection__NewEnum(This,ppvObject) \ ( (This)->lpVtbl -> _NewEnum(This,ppvObject) ) #define _ADODynaCollection_Refresh(This) \ ( (This)->lpVtbl -> Refresh(This) ) #define _ADODynaCollection_Append(This,Object) \ ( (This)->lpVtbl -> Append(This,Object) ) #define _ADODynaCollection_Delete(This,Index) \ ( (This)->lpVtbl -> Delete(This,Index) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* ___ADODynaCollection_INTERFACE_DEFINED__ */ #ifndef ___ADO_INTERFACE_DEFINED__ #define ___ADO_INTERFACE_DEFINED__ /* interface _ADO */ /* [object][uuid][nonextensible][dual] */ EXTERN_C const IID IID__ADO; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000534-0000-0010-8000-00AA006D2EA4") _ADO : public IDispatch { public: virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Properties( /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject) = 0; }; #else /* C style interface */ typedef struct _ADOVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in _ADO * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in _ADO * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in _ADO * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in _ADO * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in _ADO * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in _ADO * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( _ADO * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in _ADO * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); END_INTERFACE } _ADOVtbl; interface _ADO { CONST_VTBL struct _ADOVtbl *lpVtbl; }; #ifdef COBJMACROS #define _ADO_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _ADO_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define _ADO_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define _ADO_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _ADO_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _ADO_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _ADO_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _ADO_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* ___ADO_INTERFACE_DEFINED__ */ #ifndef __Error_INTERFACE_DEFINED__ #define __Error_INTERFACE_DEFINED__ /* interface ADOError */ /* [object][helpcontext][uuid][nonextensible][dual] */ EXTERN_C const IID IID_Error; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000500-0000-0010-8000-00AA006D2EA4") ADOError : public IDispatch { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Number( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Source( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Description( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_HelpFile( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_HelpContext( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_SQLState( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_NativeError( /* [retval][out] */ __RPC__out long *pl) = 0; }; #else /* C style interface */ typedef struct ErrorVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOError * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOError * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOError * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ADOError * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ADOError * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ADOError * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ADOError * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Number )( __RPC__in ADOError * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( __RPC__in ADOError * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Description )( __RPC__in ADOError * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_HelpFile )( __RPC__in ADOError * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_HelpContext )( __RPC__in ADOError * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_SQLState )( __RPC__in ADOError * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_NativeError )( __RPC__in ADOError * This, /* [retval][out] */ __RPC__out long *pl); END_INTERFACE } ErrorVtbl; interface Error { CONST_VTBL struct ErrorVtbl *lpVtbl; }; #ifdef COBJMACROS #define Error_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Error_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Error_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Error_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Error_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Error_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Error_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Error_get_Number(This,pl) \ ( (This)->lpVtbl -> get_Number(This,pl) ) #define Error_get_Source(This,pbstr) \ ( (This)->lpVtbl -> get_Source(This,pbstr) ) #define Error_get_Description(This,pbstr) \ ( (This)->lpVtbl -> get_Description(This,pbstr) ) #define Error_get_HelpFile(This,pbstr) \ ( (This)->lpVtbl -> get_HelpFile(This,pbstr) ) #define Error_get_HelpContext(This,pl) \ ( (This)->lpVtbl -> get_HelpContext(This,pl) ) #define Error_get_SQLState(This,pbstr) \ ( (This)->lpVtbl -> get_SQLState(This,pbstr) ) #define Error_get_NativeError(This,pl) \ ( (This)->lpVtbl -> get_NativeError(This,pl) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Error_INTERFACE_DEFINED__ */ #ifndef __Errors_INTERFACE_DEFINED__ #define __Errors_INTERFACE_DEFINED__ /* interface ADOErrors */ /* [object][helpcontext][uuid][nonextensible][dual] */ EXTERN_C const IID IID_Errors; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000501-0000-0010-8000-00AA006D2EA4") ADOErrors : public _ADOCollection { public: virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Item( /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__deref_out_opt ADOError **ppvObject) = 0; virtual /* [helpcontext] */ HRESULT STDMETHODCALLTYPE Clear( void) = 0; }; #else /* C style interface */ typedef struct ErrorsVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOErrors * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOErrors * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOErrors * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ADOErrors * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ADOErrors * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ADOErrors * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ADOErrors * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [id][helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( __RPC__in ADOErrors * This, /* [retval][out] */ __RPC__out long *c); /* [id][restricted] */ HRESULT ( STDMETHODCALLTYPE *_NewEnum )( __RPC__in ADOErrors * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppvObject); /* [id][helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Refresh )( __RPC__in ADOErrors * This); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( __RPC__in ADOErrors * This, /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__deref_out_opt ADOError **ppvObject); /* [helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Clear )( __RPC__in ADOErrors * This); END_INTERFACE } ErrorsVtbl; interface Errors { CONST_VTBL struct ErrorsVtbl *lpVtbl; }; #ifdef COBJMACROS #define Errors_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Errors_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Errors_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Errors_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Errors_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Errors_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Errors_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Errors_get_Count(This,c) \ ( (This)->lpVtbl -> get_Count(This,c) ) #define Errors__NewEnum(This,ppvObject) \ ( (This)->lpVtbl -> _NewEnum(This,ppvObject) ) #define Errors_Refresh(This) \ ( (This)->lpVtbl -> Refresh(This) ) #define Errors_get_Item(This,Index,ppvObject) \ ( (This)->lpVtbl -> get_Item(This,Index,ppvObject) ) #define Errors_Clear(This) \ ( (This)->lpVtbl -> Clear(This) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Errors_INTERFACE_DEFINED__ */ #ifndef __Command15_INTERFACE_DEFINED__ #define __Command15_INTERFACE_DEFINED__ /* interface Command15 */ /* [object][helpcontext][uuid][hidden][nonextensible][dual] */ EXTERN_C const IID IID_Command15; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001508-0000-0010-8000-00AA006D2EA4") Command15 : public _ADO { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_ActiveConnection( /* [retval][out] */ __RPC__deref_out_opt _ADOConnection **ppvObject) = 0; virtual /* [helpcontext][propputref][id] */ HRESULT STDMETHODCALLTYPE putref_ActiveConnection( /* [in] */ __RPC__in_opt _ADOConnection *pCon) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_ActiveConnection( /* [in] */ VARIANT vConn) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_CommandText( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_CommandText( /* [in] */ __RPC__in BSTR bstr) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_CommandTimeout( /* [retval][out] */ __RPC__out LONG *pl) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_CommandTimeout( /* [in] */ LONG Timeout) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Prepared( /* [retval][out] */ __RPC__out VARIANT_BOOL *pfPrepared) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Prepared( /* [in] */ VARIANT_BOOL fPrepared) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Execute( /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [optional][in] */ __RPC__in VARIANT *Parameters, /* [defaultvalue][in] */ long Options, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppirs) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE CreateParameter( /* [defaultvalue][in] */ __RPC__in BSTR Name, /* [defaultvalue][in] */ DataTypeEnum Type, /* [defaultvalue][in] */ ParameterDirectionEnum Direction, /* [defaultvalue][in] */ long Size, /* [optional][in] */ VARIANT Value, /* [retval][out] */ __RPC__deref_out_opt _ADOParameter **ppiprm) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Parameters( /* [retval][out] */ __RPC__deref_out_opt ADOParameters **ppvObject) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_CommandType( /* [in] */ CommandTypeEnum lCmdType) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_CommandType( /* [retval][out] */ __RPC__out CommandTypeEnum *plCmdType) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Name( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrName) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Name( /* [in] */ __RPC__in BSTR bstrName) = 0; }; #else /* C style interface */ typedef struct Command15Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in Command15 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in Command15 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in Command15 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in Command15 * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in Command15 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in Command15 * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( Command15 * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in Command15 * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveConnection )( __RPC__in Command15 * This, /* [retval][out] */ __RPC__deref_out_opt _ADOConnection **ppvObject); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_ActiveADOConnection )( __RPC__in Command15 * This, /* [in] */ __RPC__in_opt _ADOConnection *pCon); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ActiveConnection )( __RPC__in Command15 * This, /* [in] */ VARIANT vConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CommandText )( __RPC__in Command15 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CommandText )( __RPC__in Command15 * This, /* [in] */ __RPC__in BSTR bstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CommandTimeout )( __RPC__in Command15 * This, /* [retval][out] */ __RPC__out LONG *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CommandTimeout )( __RPC__in Command15 * This, /* [in] */ LONG Timeout); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Prepared )( __RPC__in Command15 * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pfPrepared); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Prepared )( __RPC__in Command15 * This, /* [in] */ VARIANT_BOOL fPrepared); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Execute )( __RPC__in Command15 * This, /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [optional][in] */ __RPC__in VARIANT *Parameters, /* [defaultvalue][in] */ long Options, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppirs); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CreateParameter )( __RPC__in Command15 * This, /* [defaultvalue][in] */ __RPC__in BSTR Name, /* [defaultvalue][in] */ DataTypeEnum Type, /* [defaultvalue][in] */ ParameterDirectionEnum Direction, /* [defaultvalue][in] */ long Size, /* [optional][in] */ VARIANT Value, /* [retval][out] */ __RPC__deref_out_opt _ADOParameter **ppiprm); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Parameters )( __RPC__in Command15 * This, /* [retval][out] */ __RPC__deref_out_opt ADOParameters **ppvObject); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CommandType )( __RPC__in Command15 * This, /* [in] */ CommandTypeEnum lCmdType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CommandType )( __RPC__in Command15 * This, /* [retval][out] */ __RPC__out CommandTypeEnum *plCmdType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( __RPC__in Command15 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrName); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Name )( __RPC__in Command15 * This, /* [in] */ __RPC__in BSTR bstrName); END_INTERFACE } Command15Vtbl; interface Command15 { CONST_VTBL struct Command15Vtbl *lpVtbl; }; #ifdef COBJMACROS #define Command15_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Command15_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Command15_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Command15_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Command15_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Command15_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Command15_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Command15_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define Command15_get_ActiveConnection(This,ppvObject) \ ( (This)->lpVtbl -> get_ActiveConnection(This,ppvObject) ) #define Command15_putref_ActiveConnection(This,pCon) \ ( (This)->lpVtbl -> putref_ActiveConnection(This,pCon) ) #define Command15_put_ActiveConnection(This,vConn) \ ( (This)->lpVtbl -> put_ActiveConnection(This,vConn) ) #define Command15_get_CommandText(This,pbstr) \ ( (This)->lpVtbl -> get_CommandText(This,pbstr) ) #define Command15_put_CommandText(This,bstr) \ ( (This)->lpVtbl -> put_CommandText(This,bstr) ) #define Command15_get_CommandTimeout(This,pl) \ ( (This)->lpVtbl -> get_CommandTimeout(This,pl) ) #define Command15_put_CommandTimeout(This,Timeout) \ ( (This)->lpVtbl -> put_CommandTimeout(This,Timeout) ) #define Command15_get_Prepared(This,pfPrepared) \ ( (This)->lpVtbl -> get_Prepared(This,pfPrepared) ) #define Command15_put_Prepared(This,fPrepared) \ ( (This)->lpVtbl -> put_Prepared(This,fPrepared) ) #define Command15_Execute(This,RecordsAffected,Parameters,Options,ppirs) \ ( (This)->lpVtbl -> Execute(This,RecordsAffected,Parameters,Options,ppirs) ) #define Command15_CreateParameter(This,Name,Type,Direction,Size,Value,ppiprm) \ ( (This)->lpVtbl -> CreateParameter(This,Name,Type,Direction,Size,Value,ppiprm) ) #define Command15_get_Parameters(This,ppvObject) \ ( (This)->lpVtbl -> get_Parameters(This,ppvObject) ) #define Command15_put_CommandType(This,lCmdType) \ ( (This)->lpVtbl -> put_CommandType(This,lCmdType) ) #define Command15_get_CommandType(This,plCmdType) \ ( (This)->lpVtbl -> get_CommandType(This,plCmdType) ) #define Command15_get_Name(This,pbstrName) \ ( (This)->lpVtbl -> get_Name(This,pbstrName) ) #define Command15_put_Name(This,bstrName) \ ( (This)->lpVtbl -> put_Name(This,bstrName) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Command15_INTERFACE_DEFINED__ */ #ifndef __Command25_INTERFACE_DEFINED__ #define __Command25_INTERFACE_DEFINED__ /* interface Command25 */ /* [object][helpcontext][uuid][hidden][nonextensible][dual] */ EXTERN_C const IID IID_Command25; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("0000154E-0000-0010-8000-00AA006D2EA4") Command25 : public Command15 { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ __RPC__out LONG *plObjState) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Cancel( void) = 0; }; #else /* C style interface */ typedef struct Command25Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in Command25 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in Command25 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in Command25 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in Command25 * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in Command25 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in Command25 * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( Command25 * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in Command25 * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveConnection )( __RPC__in Command25 * This, /* [retval][out] */ __RPC__deref_out_opt _ADOConnection **ppvObject); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_ActiveADOConnection )( __RPC__in Command25 * This, /* [in] */ __RPC__in_opt _ADOConnection *pCon); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ActiveConnection )( __RPC__in Command25 * This, /* [in] */ VARIANT vConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CommandText )( __RPC__in Command25 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CommandText )( __RPC__in Command25 * This, /* [in] */ __RPC__in BSTR bstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CommandTimeout )( __RPC__in Command25 * This, /* [retval][out] */ __RPC__out LONG *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CommandTimeout )( __RPC__in Command25 * This, /* [in] */ LONG Timeout); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Prepared )( __RPC__in Command25 * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pfPrepared); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Prepared )( __RPC__in Command25 * This, /* [in] */ VARIANT_BOOL fPrepared); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Execute )( __RPC__in Command25 * This, /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [optional][in] */ __RPC__in VARIANT *Parameters, /* [defaultvalue][in] */ long Options, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppirs); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CreateParameter )( __RPC__in Command25 * This, /* [defaultvalue][in] */ __RPC__in BSTR Name, /* [defaultvalue][in] */ DataTypeEnum Type, /* [defaultvalue][in] */ ParameterDirectionEnum Direction, /* [defaultvalue][in] */ long Size, /* [optional][in] */ VARIANT Value, /* [retval][out] */ __RPC__deref_out_opt _ADOParameter **ppiprm); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Parameters )( __RPC__in Command25 * This, /* [retval][out] */ __RPC__deref_out_opt ADOParameters **ppvObject); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CommandType )( __RPC__in Command25 * This, /* [in] */ CommandTypeEnum lCmdType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CommandType )( __RPC__in Command25 * This, /* [retval][out] */ __RPC__out CommandTypeEnum *plCmdType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( __RPC__in Command25 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrName); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Name )( __RPC__in Command25 * This, /* [in] */ __RPC__in BSTR bstrName); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_State )( __RPC__in Command25 * This, /* [retval][out] */ __RPC__out LONG *plObjState); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Cancel )( __RPC__in Command25 * This); END_INTERFACE } Command25Vtbl; interface Command25 { CONST_VTBL struct Command25Vtbl *lpVtbl; }; #ifdef COBJMACROS #define Command25_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Command25_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Command25_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Command25_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Command25_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Command25_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Command25_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Command25_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define Command25_get_ActiveConnection(This,ppvObject) \ ( (This)->lpVtbl -> get_ActiveConnection(This,ppvObject) ) #define Command25_putref_ActiveConnection(This,pCon) \ ( (This)->lpVtbl -> putref_ActiveConnection(This,pCon) ) #define Command25_put_ActiveConnection(This,vConn) \ ( (This)->lpVtbl -> put_ActiveConnection(This,vConn) ) #define Command25_get_CommandText(This,pbstr) \ ( (This)->lpVtbl -> get_CommandText(This,pbstr) ) #define Command25_put_CommandText(This,bstr) \ ( (This)->lpVtbl -> put_CommandText(This,bstr) ) #define Command25_get_CommandTimeout(This,pl) \ ( (This)->lpVtbl -> get_CommandTimeout(This,pl) ) #define Command25_put_CommandTimeout(This,Timeout) \ ( (This)->lpVtbl -> put_CommandTimeout(This,Timeout) ) #define Command25_get_Prepared(This,pfPrepared) \ ( (This)->lpVtbl -> get_Prepared(This,pfPrepared) ) #define Command25_put_Prepared(This,fPrepared) \ ( (This)->lpVtbl -> put_Prepared(This,fPrepared) ) #define Command25_Execute(This,RecordsAffected,Parameters,Options,ppirs) \ ( (This)->lpVtbl -> Execute(This,RecordsAffected,Parameters,Options,ppirs) ) #define Command25_CreateParameter(This,Name,Type,Direction,Size,Value,ppiprm) \ ( (This)->lpVtbl -> CreateParameter(This,Name,Type,Direction,Size,Value,ppiprm) ) #define Command25_get_Parameters(This,ppvObject) \ ( (This)->lpVtbl -> get_Parameters(This,ppvObject) ) #define Command25_put_CommandType(This,lCmdType) \ ( (This)->lpVtbl -> put_CommandType(This,lCmdType) ) #define Command25_get_CommandType(This,plCmdType) \ ( (This)->lpVtbl -> get_CommandType(This,plCmdType) ) #define Command25_get_Name(This,pbstrName) \ ( (This)->lpVtbl -> get_Name(This,pbstrName) ) #define Command25_put_Name(This,bstrName) \ ( (This)->lpVtbl -> put_Name(This,bstrName) ) #define Command25_get_State(This,plObjState) \ ( (This)->lpVtbl -> get_State(This,plObjState) ) #define Command25_Cancel(This) \ ( (This)->lpVtbl -> Cancel(This) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Command25_INTERFACE_DEFINED__ */ #ifndef ___Command_INTERFACE_DEFINED__ #define ___Command_INTERFACE_DEFINED__ /* interface _ADOCommand */ /* [object][helpcontext][uuid][nonextensible][dual] */ EXTERN_C const IID IID__Command; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("986761E8-7269-4890-AA65-AD7C03697A6D") _ADOCommand : public Command25 { public: virtual /* [helpcontext][propputref][id] */ HRESULT __stdcall putref_CommandStream( /* [in] */ __RPC__in_opt IUnknown *pStream) = 0; virtual /* [helpcontext][propget][id] */ HRESULT __stdcall get_CommandStream( /* [retval][out] */ __RPC__out VARIANT *pvStream) = 0; virtual /* [helpcontext][propput][id] */ HRESULT __stdcall put_Dialect( /* [in] */ __RPC__in BSTR bstrDialect) = 0; virtual /* [helpcontext][propget][id] */ HRESULT __stdcall get_Dialect( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrDialect) = 0; virtual /* [helpcontext][propput][id] */ HRESULT __stdcall put_NamedParameters( /* [in] */ VARIANT_BOOL fNamedParameters) = 0; virtual /* [helpcontext][propget][id] */ HRESULT __stdcall get_NamedParameters( /* [retval][out] */ __RPC__out VARIANT_BOOL *pfNamedParameters) = 0; }; #else /* C style interface */ typedef struct _CommandVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in _ADOCommand * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in _ADOCommand * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in _ADOCommand * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in _ADOCommand * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in _ADOCommand * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in _ADOCommand * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( _ADOCommand * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveConnection )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__deref_out_opt _ADOConnection **ppvObject); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_ActiveADOConnection )( __RPC__in _ADOCommand * This, /* [in] */ __RPC__in_opt _ADOConnection *pCon); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ActiveConnection )( __RPC__in _ADOCommand * This, /* [in] */ VARIANT vConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CommandText )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CommandText )( __RPC__in _ADOCommand * This, /* [in] */ __RPC__in BSTR bstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CommandTimeout )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__out LONG *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CommandTimeout )( __RPC__in _ADOCommand * This, /* [in] */ LONG Timeout); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Prepared )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pfPrepared); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Prepared )( __RPC__in _ADOCommand * This, /* [in] */ VARIANT_BOOL fPrepared); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Execute )( __RPC__in _ADOCommand * This, /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [optional][in] */ __RPC__in VARIANT *Parameters, /* [defaultvalue][in] */ long Options, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppirs); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CreateParameter )( __RPC__in _ADOCommand * This, /* [defaultvalue][in] */ __RPC__in BSTR Name, /* [defaultvalue][in] */ DataTypeEnum Type, /* [defaultvalue][in] */ ParameterDirectionEnum Direction, /* [defaultvalue][in] */ long Size, /* [optional][in] */ VARIANT Value, /* [retval][out] */ __RPC__deref_out_opt _ADOParameter **ppiprm); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Parameters )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__deref_out_opt ADOParameters **ppvObject); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CommandType )( __RPC__in _ADOCommand * This, /* [in] */ CommandTypeEnum lCmdType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CommandType )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__out CommandTypeEnum *plCmdType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrName); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Name )( __RPC__in _ADOCommand * This, /* [in] */ __RPC__in BSTR bstrName); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_State )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__out LONG *plObjState); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Cancel )( __RPC__in _ADOCommand * This); /* [helpcontext][propputref][id] */ HRESULT ( __stdcall *putref_CommandADOStream )( __RPC__in _ADOCommand * This, /* [in] */ __RPC__in_opt IUnknown *pStream); /* [helpcontext][propget][id] */ HRESULT ( __stdcall *get_CommandStream )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__out VARIANT *pvStream); /* [helpcontext][propput][id] */ HRESULT ( __stdcall *put_Dialect )( __RPC__in _ADOCommand * This, /* [in] */ __RPC__in BSTR bstrDialect); /* [helpcontext][propget][id] */ HRESULT ( __stdcall *get_Dialect )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrDialect); /* [helpcontext][propput][id] */ HRESULT ( __stdcall *put_NamedParameters )( __RPC__in _ADOCommand * This, /* [in] */ VARIANT_BOOL fNamedParameters); /* [helpcontext][propget][id] */ HRESULT ( __stdcall *get_NamedParameters )( __RPC__in _ADOCommand * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pfNamedParameters); END_INTERFACE } _CommandVtbl; interface _Command { CONST_VTBL struct _CommandVtbl *lpVtbl; }; #ifdef COBJMACROS #define _Command_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _Command_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define _Command_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define _Command_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _Command_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _Command_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _Command_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _Command_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define _Command_get_ActiveConnection(This,ppvObject) \ ( (This)->lpVtbl -> get_ActiveConnection(This,ppvObject) ) #define _Command_putref_ActiveConnection(This,pCon) \ ( (This)->lpVtbl -> putref_ActiveConnection(This,pCon) ) #define _Command_put_ActiveConnection(This,vConn) \ ( (This)->lpVtbl -> put_ActiveConnection(This,vConn) ) #define _Command_get_CommandText(This,pbstr) \ ( (This)->lpVtbl -> get_CommandText(This,pbstr) ) #define _Command_put_CommandText(This,bstr) \ ( (This)->lpVtbl -> put_CommandText(This,bstr) ) #define _Command_get_CommandTimeout(This,pl) \ ( (This)->lpVtbl -> get_CommandTimeout(This,pl) ) #define _Command_put_CommandTimeout(This,Timeout) \ ( (This)->lpVtbl -> put_CommandTimeout(This,Timeout) ) #define _Command_get_Prepared(This,pfPrepared) \ ( (This)->lpVtbl -> get_Prepared(This,pfPrepared) ) #define _Command_put_Prepared(This,fPrepared) \ ( (This)->lpVtbl -> put_Prepared(This,fPrepared) ) #define _Command_Execute(This,RecordsAffected,Parameters,Options,ppirs) \ ( (This)->lpVtbl -> Execute(This,RecordsAffected,Parameters,Options,ppirs) ) #define _Command_CreateParameter(This,Name,Type,Direction,Size,Value,ppiprm) \ ( (This)->lpVtbl -> CreateParameter(This,Name,Type,Direction,Size,Value,ppiprm) ) #define _Command_get_Parameters(This,ppvObject) \ ( (This)->lpVtbl -> get_Parameters(This,ppvObject) ) #define _Command_put_CommandType(This,lCmdType) \ ( (This)->lpVtbl -> put_CommandType(This,lCmdType) ) #define _Command_get_CommandType(This,plCmdType) \ ( (This)->lpVtbl -> get_CommandType(This,plCmdType) ) #define _Command_get_Name(This,pbstrName) \ ( (This)->lpVtbl -> get_Name(This,pbstrName) ) #define _Command_put_Name(This,bstrName) \ ( (This)->lpVtbl -> put_Name(This,bstrName) ) #define _Command_get_State(This,plObjState) \ ( (This)->lpVtbl -> get_State(This,plObjState) ) #define _Command_Cancel(This) \ ( (This)->lpVtbl -> Cancel(This) ) #define _Command_putref_CommandStream(This,pStream) \ ( (This)->lpVtbl -> putref_CommandStream(This,pStream) ) #define _Command_get_CommandStream(This,pvStream) \ ( (This)->lpVtbl -> get_CommandStream(This,pvStream) ) #define _Command_put_Dialect(This,bstrDialect) \ ( (This)->lpVtbl -> put_Dialect(This,bstrDialect) ) #define _Command_get_Dialect(This,pbstrDialect) \ ( (This)->lpVtbl -> get_Dialect(This,pbstrDialect) ) #define _Command_put_NamedParameters(This,fNamedParameters) \ ( (This)->lpVtbl -> put_NamedParameters(This,fNamedParameters) ) #define _Command_get_NamedParameters(This,pfNamedParameters) \ ( (This)->lpVtbl -> get_NamedParameters(This,pfNamedParameters) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* ___Command_INTERFACE_DEFINED__ */ #ifndef __ConnectionEventsVt_INTERFACE_DEFINED__ #define __ConnectionEventsVt_INTERFACE_DEFINED__ /* interface ConnectionEventsVt */ /* [object][uuid][hidden] */ EXTERN_C const IID IID_ConnectionEventsVt; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001402-0000-0010-8000-00AA006D2EA4") ConnectionEventsVt : public IUnknown { public: virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE InfoMessage( /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE BeginTransComplete( /* [in] */ LONG TransactionLevel, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE CommitTransComplete( /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE RollbackTransComplete( /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE WillExecute( /* [out][in] */ __RPC__deref_inout_opt BSTR *Source, /* [out][in] */ __RPC__inout CursorTypeEnum *CursorType, /* [out][in] */ __RPC__inout LockTypeEnum *LockType, /* [out][in] */ __RPC__inout long *Options, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOCommand *pCommand, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset, /* [in] */ __RPC__in_opt _ADOConnection *pConnection) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE ExecuteComplete( /* [in] */ LONG RecordsAffected, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOCommand *pCommand, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset, /* [in] */ __RPC__in_opt _ADOConnection *pConnection) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE WillConnect( /* [out][in] */ __RPC__deref_inout_opt BSTR *ConnectionString, /* [out][in] */ __RPC__deref_inout_opt BSTR *UserID, /* [out][in] */ __RPC__deref_inout_opt BSTR *Password, /* [out][in] */ __RPC__inout long *Options, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE ConnectComplete( /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Disconnect( /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection) = 0; }; #else /* C style interface */ typedef struct ConnectionEventsVtVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ConnectionEventsVt * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ConnectionEventsVt * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ConnectionEventsVt * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *InfoMessage )( __RPC__in ConnectionEventsVt * This, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *BeginTransComplete )( __RPC__in ConnectionEventsVt * This, /* [in] */ LONG TransactionLevel, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CommitTransComplete )( __RPC__in ConnectionEventsVt * This, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *RollbackTransComplete )( __RPC__in ConnectionEventsVt * This, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *WillExecute )( __RPC__in ConnectionEventsVt * This, /* [out][in] */ __RPC__deref_inout_opt BSTR *Source, /* [out][in] */ __RPC__inout CursorTypeEnum *CursorType, /* [out][in] */ __RPC__inout LockTypeEnum *LockType, /* [out][in] */ __RPC__inout long *Options, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOCommand *pCommand, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset, /* [in] */ __RPC__in_opt _ADOConnection *pConnection); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *ExecuteComplete )( __RPC__in ConnectionEventsVt * This, /* [in] */ LONG RecordsAffected, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOCommand *pCommand, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset, /* [in] */ __RPC__in_opt _ADOConnection *pConnection); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *WillConnect )( __RPC__in ConnectionEventsVt * This, /* [out][in] */ __RPC__deref_inout_opt BSTR *ConnectionString, /* [out][in] */ __RPC__deref_inout_opt BSTR *UserID, /* [out][in] */ __RPC__deref_inout_opt BSTR *Password, /* [out][in] */ __RPC__inout long *Options, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *ConnectComplete )( __RPC__in ConnectionEventsVt * This, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Disconnect )( __RPC__in ConnectionEventsVt * This, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADOConnection *pConnection); END_INTERFACE } ConnectionEventsVtVtbl; interface ConnectionEventsVt { CONST_VTBL struct ConnectionEventsVtVtbl *lpVtbl; }; #ifdef COBJMACROS #define ConnectionEventsVt_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ConnectionEventsVt_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define ConnectionEventsVt_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define ConnectionEventsVt_InfoMessage(This,pError,adStatus,pConnection) \ ( (This)->lpVtbl -> InfoMessage(This,pError,adStatus,pConnection) ) #define ConnectionEventsVt_BeginTransComplete(This,TransactionLevel,pError,adStatus,pConnection) \ ( (This)->lpVtbl -> BeginTransComplete(This,TransactionLevel,pError,adStatus,pConnection) ) #define ConnectionEventsVt_CommitTransComplete(This,pError,adStatus,pConnection) \ ( (This)->lpVtbl -> CommitTransComplete(This,pError,adStatus,pConnection) ) #define ConnectionEventsVt_RollbackTransComplete(This,pError,adStatus,pConnection) \ ( (This)->lpVtbl -> RollbackTransComplete(This,pError,adStatus,pConnection) ) #define ConnectionEventsVt_WillExecute(This,Source,CursorType,LockType,Options,adStatus,pCommand,pRecordset,pConnection) \ ( (This)->lpVtbl -> WillExecute(This,Source,CursorType,LockType,Options,adStatus,pCommand,pRecordset,pConnection) ) #define ConnectionEventsVt_ExecuteComplete(This,RecordsAffected,pError,adStatus,pCommand,pRecordset,pConnection) \ ( (This)->lpVtbl -> ExecuteComplete(This,RecordsAffected,pError,adStatus,pCommand,pRecordset,pConnection) ) #define ConnectionEventsVt_WillConnect(This,ConnectionString,UserID,Password,Options,adStatus,pConnection) \ ( (This)->lpVtbl -> WillConnect(This,ConnectionString,UserID,Password,Options,adStatus,pConnection) ) #define ConnectionEventsVt_ConnectComplete(This,pError,adStatus,pConnection) \ ( (This)->lpVtbl -> ConnectComplete(This,pError,adStatus,pConnection) ) #define ConnectionEventsVt_Disconnect(This,adStatus,pConnection) \ ( (This)->lpVtbl -> Disconnect(This,adStatus,pConnection) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __ConnectionEventsVt_INTERFACE_DEFINED__ */ #ifndef __RecordsetEventsVt_INTERFACE_DEFINED__ #define __RecordsetEventsVt_INTERFACE_DEFINED__ /* interface RecordsetEventsVt */ /* [object][uuid][hidden] */ EXTERN_C const IID IID_RecordsetEventsVt; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001403-0000-0010-8000-00AA006D2EA4") RecordsetEventsVt : public IUnknown { public: virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE WillChangeField( /* [in] */ LONG cFields, /* [in] */ VARIANT Fields, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE FieldChangeComplete( /* [in] */ LONG cFields, /* [in] */ VARIANT Fields, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE WillChangeRecord( /* [in] */ EventReasonEnum adReason, /* [in] */ LONG cRecords, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE RecordChangeComplete( /* [in] */ EventReasonEnum adReason, /* [in] */ LONG cRecords, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE WillChangeRecordset( /* [in] */ EventReasonEnum adReason, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE RecordsetChangeComplete( /* [in] */ EventReasonEnum adReason, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE WillMove( /* [in] */ EventReasonEnum adReason, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE MoveComplete( /* [in] */ EventReasonEnum adReason, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE EndOfRecordset( /* [out][in] */ __RPC__inout VARIANT_BOOL *fMoreData, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE FetchProgress( /* [in] */ long Progress, /* [in] */ long MaxProgress, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE FetchComplete( /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset) = 0; }; #else /* C style interface */ typedef struct RecordsetEventsVtVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in RecordsetEventsVt * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in RecordsetEventsVt * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in RecordsetEventsVt * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *WillChangeADOField )( __RPC__in RecordsetEventsVt * This, /* [in] */ LONG cFields, /* [in] */ VARIANT Fields, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *FieldChangeComplete )( __RPC__in RecordsetEventsVt * This, /* [in] */ LONG cFields, /* [in] */ VARIANT Fields, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *WillChangeADORecord )( __RPC__in RecordsetEventsVt * This, /* [in] */ EventReasonEnum adReason, /* [in] */ LONG cRecords, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *RecordChangeComplete )( __RPC__in RecordsetEventsVt * This, /* [in] */ EventReasonEnum adReason, /* [in] */ LONG cRecords, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *WillChangeADORecordset )( __RPC__in RecordsetEventsVt * This, /* [in] */ EventReasonEnum adReason, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *RecordsetChangeComplete )( __RPC__in RecordsetEventsVt * This, /* [in] */ EventReasonEnum adReason, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *WillMove )( __RPC__in RecordsetEventsVt * This, /* [in] */ EventReasonEnum adReason, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveComplete )( __RPC__in RecordsetEventsVt * This, /* [in] */ EventReasonEnum adReason, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *EndOfADORecordset )( __RPC__in RecordsetEventsVt * This, /* [out][in] */ __RPC__inout VARIANT_BOOL *fMoreData, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *FetchProgress )( __RPC__in RecordsetEventsVt * This, /* [in] */ long Progress, /* [in] */ long MaxProgress, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *FetchComplete )( __RPC__in RecordsetEventsVt * This, /* [in] */ __RPC__in_opt ADOError *pError, /* [out][in] */ __RPC__inout EventStatusEnum *adStatus, /* [in] */ __RPC__in_opt _ADORecordset *pRecordset); END_INTERFACE } RecordsetEventsVtVtbl; interface RecordsetEventsVt { CONST_VTBL struct RecordsetEventsVtVtbl *lpVtbl; }; #ifdef COBJMACROS #define RecordsetEventsVt_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define RecordsetEventsVt_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define RecordsetEventsVt_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define RecordsetEventsVt_WillChangeField(This,cFields,Fields,adStatus,pRecordset) \ ( (This)->lpVtbl -> WillChangeField(This,cFields,Fields,adStatus,pRecordset) ) #define RecordsetEventsVt_FieldChangeComplete(This,cFields,Fields,pError,adStatus,pRecordset) \ ( (This)->lpVtbl -> FieldChangeComplete(This,cFields,Fields,pError,adStatus,pRecordset) ) #define RecordsetEventsVt_WillChangeRecord(This,adReason,cRecords,adStatus,pRecordset) \ ( (This)->lpVtbl -> WillChangeRecord(This,adReason,cRecords,adStatus,pRecordset) ) #define RecordsetEventsVt_RecordChangeComplete(This,adReason,cRecords,pError,adStatus,pRecordset) \ ( (This)->lpVtbl -> RecordChangeComplete(This,adReason,cRecords,pError,adStatus,pRecordset) ) #define RecordsetEventsVt_WillChangeRecordset(This,adReason,adStatus,pRecordset) \ ( (This)->lpVtbl -> WillChangeRecordset(This,adReason,adStatus,pRecordset) ) #define RecordsetEventsVt_RecordsetChangeComplete(This,adReason,pError,adStatus,pRecordset) \ ( (This)->lpVtbl -> RecordsetChangeComplete(This,adReason,pError,adStatus,pRecordset) ) #define RecordsetEventsVt_WillMove(This,adReason,adStatus,pRecordset) \ ( (This)->lpVtbl -> WillMove(This,adReason,adStatus,pRecordset) ) #define RecordsetEventsVt_MoveComplete(This,adReason,pError,adStatus,pRecordset) \ ( (This)->lpVtbl -> MoveComplete(This,adReason,pError,adStatus,pRecordset) ) #define RecordsetEventsVt_EndOfRecordset(This,fMoreData,adStatus,pRecordset) \ ( (This)->lpVtbl -> EndOfRecordset(This,fMoreData,adStatus,pRecordset) ) #define RecordsetEventsVt_FetchProgress(This,Progress,MaxProgress,adStatus,pRecordset) \ ( (This)->lpVtbl -> FetchProgress(This,Progress,MaxProgress,adStatus,pRecordset) ) #define RecordsetEventsVt_FetchComplete(This,pError,adStatus,pRecordset) \ ( (This)->lpVtbl -> FetchComplete(This,pError,adStatus,pRecordset) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __RecordsetEventsVt_INTERFACE_DEFINED__ */ #ifndef __ConnectionEvents_DISPINTERFACE_DEFINED__ #define __ConnectionEvents_DISPINTERFACE_DEFINED__ /* dispinterface ConnectionEvents */ /* [uuid] */ EXTERN_C const IID DIID_ConnectionEvents; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001400-0000-0010-8000-00AA006D2EA4") ConnectionEvents : public IDispatch { }; #else /* C style interface */ typedef struct ConnectionEventsVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ConnectionEvents * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ConnectionEvents * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ConnectionEvents * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ConnectionEvents * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ConnectionEvents * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ConnectionEvents * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ConnectionEvents * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); END_INTERFACE } ConnectionEventsVtbl; interface ConnectionEvents { CONST_VTBL struct ConnectionEventsVtbl *lpVtbl; }; #ifdef COBJMACROS #define ConnectionEvents_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ConnectionEvents_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define ConnectionEvents_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define ConnectionEvents_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define ConnectionEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define ConnectionEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define ConnectionEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __ConnectionEvents_DISPINTERFACE_DEFINED__ */ #ifndef __RecordsetEvents_DISPINTERFACE_DEFINED__ #define __RecordsetEvents_DISPINTERFACE_DEFINED__ /* dispinterface RecordsetEvents */ /* [uuid] */ EXTERN_C const IID DIID_RecordsetEvents; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001266-0000-0010-8000-00AA006D2EA4") RecordsetEvents : public IDispatch { }; #else /* C style interface */ typedef struct RecordsetEventsVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in RecordsetEvents * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in RecordsetEvents * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in RecordsetEvents * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in RecordsetEvents * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in RecordsetEvents * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in RecordsetEvents * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( RecordsetEvents * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); END_INTERFACE } RecordsetEventsVtbl; interface RecordsetEvents { CONST_VTBL struct RecordsetEventsVtbl *lpVtbl; }; #ifdef COBJMACROS #define RecordsetEvents_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define RecordsetEvents_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define RecordsetEvents_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define RecordsetEvents_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define RecordsetEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define RecordsetEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define RecordsetEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __RecordsetEvents_DISPINTERFACE_DEFINED__ */ #ifndef __Connection15_INTERFACE_DEFINED__ #define __Connection15_INTERFACE_DEFINED__ /* interface Connection15 */ /* [object][helpcontext][uuid][hidden][dual] */ EXTERN_C const IID IID_Connection15; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001515-0000-0010-8000-00AA006D2EA4") Connection15 : public _ADO { public: virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_ConnectionString( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_ConnectionString( /* [in] */ __RPC__in BSTR bstr) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_CommandTimeout( /* [retval][out] */ __RPC__out LONG *plTimeout) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_CommandTimeout( /* [in] */ LONG lTimeout) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_ConnectionTimeout( /* [retval][out] */ __RPC__out LONG *plTimeout) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_ConnectionTimeout( /* [in] */ LONG lTimeout) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Version( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Close( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Execute( /* [in] */ __RPC__in BSTR CommandText, /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [defaultvalue][in] */ long Options, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppiRset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE BeginTrans( /* [retval][out] */ __RPC__out long *TransactionLevel) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE CommitTrans( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE RollbackTrans( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Open( /* [defaultvalue][in] */ __RPC__in BSTR ConnectionString = (BSTR)NULL, /* [defaultvalue][in] */ __RPC__in BSTR UserID = (BSTR)NULL, /* [defaultvalue][in] */ __RPC__in BSTR Password = (BSTR)NULL, /* [defaultvalue][in] */ long Options = adOptionUnspecified) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Errors( /* [retval][out] */ __RPC__deref_out_opt ADOErrors **ppvObject) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_DefaultDatabase( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_DefaultDatabase( /* [in] */ __RPC__in BSTR bstr) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_IsolationLevel( /* [retval][out] */ __RPC__out IsolationLevelEnum *Level) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_IsolationLevel( /* [in] */ IsolationLevelEnum Level) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Attributes( /* [retval][out] */ __RPC__out long *plAttr) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_Attributes( /* [in] */ long lAttr) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_CursorLocation( /* [retval][out] */ __RPC__out CursorLocationEnum *plCursorLoc) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_CursorLocation( /* [in] */ CursorLocationEnum lCursorLoc) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Mode( /* [retval][out] */ __RPC__out ConnectModeEnum *plMode) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_Mode( /* [in] */ ConnectModeEnum lMode) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Provider( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_Provider( /* [in] */ __RPC__in BSTR Provider) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ __RPC__out LONG *plObjState) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE OpenSchema( /* [in] */ SchemaEnum Schema, /* [optional][in] */ VARIANT Restrictions, /* [optional][in] */ VARIANT SchemaID, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **pprset) = 0; }; #else /* C style interface */ typedef struct Connection15Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in Connection15 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in Connection15 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in Connection15 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in Connection15 * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in Connection15 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in Connection15 * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( Connection15 * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ConnectionString )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ConnectionString )( __RPC__in Connection15 * This, /* [in] */ __RPC__in BSTR bstr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CommandTimeout )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__out LONG *plTimeout); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CommandTimeout )( __RPC__in Connection15 * This, /* [in] */ LONG lTimeout); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ConnectionTimeout )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__out LONG *plTimeout); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ConnectionTimeout )( __RPC__in Connection15 * This, /* [in] */ LONG lTimeout); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Version )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Close )( __RPC__in Connection15 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Execute )( __RPC__in Connection15 * This, /* [in] */ __RPC__in BSTR CommandText, /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [defaultvalue][in] */ long Options, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppiRset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *BeginTrans )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__out long *TransactionLevel); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CommitTrans )( __RPC__in Connection15 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *RollbackTrans )( __RPC__in Connection15 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Open )( __RPC__in Connection15 * This, /* [defaultvalue][in] */ __RPC__in BSTR ConnectionString, /* [defaultvalue][in] */ __RPC__in BSTR UserID, /* [defaultvalue][in] */ __RPC__in BSTR Password, /* [defaultvalue][in] */ long Options); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Errors )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__deref_out_opt ADOErrors **ppvObject); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultDatabase )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultDatabase )( __RPC__in Connection15 * This, /* [in] */ __RPC__in BSTR bstr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsolationLevel )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__out IsolationLevelEnum *Level); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsolationLevel )( __RPC__in Connection15 * This, /* [in] */ IsolationLevelEnum Level); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Attributes )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__out long *plAttr); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Attributes )( __RPC__in Connection15 * This, /* [in] */ long lAttr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CursorLocation )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__out CursorLocationEnum *plCursorLoc); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CursorLocation )( __RPC__in Connection15 * This, /* [in] */ CursorLocationEnum lCursorLoc); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Mode )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__out ConnectModeEnum *plMode); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Mode )( __RPC__in Connection15 * This, /* [in] */ ConnectModeEnum lMode); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Provider )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Provider )( __RPC__in Connection15 * This, /* [in] */ __RPC__in BSTR Provider); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( __RPC__in Connection15 * This, /* [retval][out] */ __RPC__out LONG *plObjState); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *OpenSchema )( __RPC__in Connection15 * This, /* [in] */ SchemaEnum Schema, /* [optional][in] */ VARIANT Restrictions, /* [optional][in] */ VARIANT SchemaID, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **pprset); END_INTERFACE } Connection15Vtbl; interface Connection15 { CONST_VTBL struct Connection15Vtbl *lpVtbl; }; #ifdef COBJMACROS #define Connection15_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Connection15_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Connection15_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Connection15_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Connection15_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Connection15_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Connection15_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Connection15_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define Connection15_get_ConnectionString(This,pbstr) \ ( (This)->lpVtbl -> get_ConnectionString(This,pbstr) ) #define Connection15_put_ConnectionString(This,bstr) \ ( (This)->lpVtbl -> put_ConnectionString(This,bstr) ) #define Connection15_get_CommandTimeout(This,plTimeout) \ ( (This)->lpVtbl -> get_CommandTimeout(This,plTimeout) ) #define Connection15_put_CommandTimeout(This,lTimeout) \ ( (This)->lpVtbl -> put_CommandTimeout(This,lTimeout) ) #define Connection15_get_ConnectionTimeout(This,plTimeout) \ ( (This)->lpVtbl -> get_ConnectionTimeout(This,plTimeout) ) #define Connection15_put_ConnectionTimeout(This,lTimeout) \ ( (This)->lpVtbl -> put_ConnectionTimeout(This,lTimeout) ) #define Connection15_get_Version(This,pbstr) \ ( (This)->lpVtbl -> get_Version(This,pbstr) ) #define Connection15_Close(This) \ ( (This)->lpVtbl -> Close(This) ) #define Connection15_Execute(This,CommandText,RecordsAffected,Options,ppiRset) \ ( (This)->lpVtbl -> Execute(This,CommandText,RecordsAffected,Options,ppiRset) ) #define Connection15_BeginTrans(This,TransactionLevel) \ ( (This)->lpVtbl -> BeginTrans(This,TransactionLevel) ) #define Connection15_CommitTrans(This) \ ( (This)->lpVtbl -> CommitTrans(This) ) #define Connection15_RollbackTrans(This) \ ( (This)->lpVtbl -> RollbackTrans(This) ) #define Connection15_Open(This,ConnectionString,UserID,Password,Options) \ ( (This)->lpVtbl -> Open(This,ConnectionString,UserID,Password,Options) ) #define Connection15_get_Errors(This,ppvObject) \ ( (This)->lpVtbl -> get_Errors(This,ppvObject) ) #define Connection15_get_DefaultDatabase(This,pbstr) \ ( (This)->lpVtbl -> get_DefaultDatabase(This,pbstr) ) #define Connection15_put_DefaultDatabase(This,bstr) \ ( (This)->lpVtbl -> put_DefaultDatabase(This,bstr) ) #define Connection15_get_IsolationLevel(This,Level) \ ( (This)->lpVtbl -> get_IsolationLevel(This,Level) ) #define Connection15_put_IsolationLevel(This,Level) \ ( (This)->lpVtbl -> put_IsolationLevel(This,Level) ) #define Connection15_get_Attributes(This,plAttr) \ ( (This)->lpVtbl -> get_Attributes(This,plAttr) ) #define Connection15_put_Attributes(This,lAttr) \ ( (This)->lpVtbl -> put_Attributes(This,lAttr) ) #define Connection15_get_CursorLocation(This,plCursorLoc) \ ( (This)->lpVtbl -> get_CursorLocation(This,plCursorLoc) ) #define Connection15_put_CursorLocation(This,lCursorLoc) \ ( (This)->lpVtbl -> put_CursorLocation(This,lCursorLoc) ) #define Connection15_get_Mode(This,plMode) \ ( (This)->lpVtbl -> get_Mode(This,plMode) ) #define Connection15_put_Mode(This,lMode) \ ( (This)->lpVtbl -> put_Mode(This,lMode) ) #define Connection15_get_Provider(This,pbstr) \ ( (This)->lpVtbl -> get_Provider(This,pbstr) ) #define Connection15_put_Provider(This,Provider) \ ( (This)->lpVtbl -> put_Provider(This,Provider) ) #define Connection15_get_State(This,plObjState) \ ( (This)->lpVtbl -> get_State(This,plObjState) ) #define Connection15_OpenSchema(This,Schema,Restrictions,SchemaID,pprset) \ ( (This)->lpVtbl -> OpenSchema(This,Schema,Restrictions,SchemaID,pprset) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Connection15_INTERFACE_DEFINED__ */ #ifndef ___Connection_INTERFACE_DEFINED__ #define ___Connection_INTERFACE_DEFINED__ /* interface _ADOConnection */ /* [object][helpcontext][uuid][dual] */ EXTERN_C const IID IID__Connection; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001550-0000-0010-8000-00AA006D2EA4") _ADOConnection : public Connection15 { public: virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Cancel( void) = 0; }; #else /* C style interface */ typedef struct _ConnectionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in _ADOConnection * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in _ADOConnection * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in _ADOConnection * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in _ADOConnection * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in _ADOConnection * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in _ADOConnection * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( _ADOConnection * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ConnectionString )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ConnectionString )( __RPC__in _ADOConnection * This, /* [in] */ __RPC__in BSTR bstr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CommandTimeout )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__out LONG *plTimeout); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CommandTimeout )( __RPC__in _ADOConnection * This, /* [in] */ LONG lTimeout); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ConnectionTimeout )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__out LONG *plTimeout); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ConnectionTimeout )( __RPC__in _ADOConnection * This, /* [in] */ LONG lTimeout); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Version )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Close )( __RPC__in _ADOConnection * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Execute )( __RPC__in _ADOConnection * This, /* [in] */ __RPC__in BSTR CommandText, /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [defaultvalue][in] */ long Options, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppiRset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *BeginTrans )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__out long *TransactionLevel); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CommitTrans )( __RPC__in _ADOConnection * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *RollbackTrans )( __RPC__in _ADOConnection * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Open )( __RPC__in _ADOConnection * This, /* [defaultvalue][in] */ __RPC__in BSTR ConnectionString, /* [defaultvalue][in] */ __RPC__in BSTR UserID, /* [defaultvalue][in] */ __RPC__in BSTR Password, /* [defaultvalue][in] */ long Options); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Errors )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__deref_out_opt ADOErrors **ppvObject); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultDatabase )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultDatabase )( __RPC__in _ADOConnection * This, /* [in] */ __RPC__in BSTR bstr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsolationLevel )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__out IsolationLevelEnum *Level); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsolationLevel )( __RPC__in _ADOConnection * This, /* [in] */ IsolationLevelEnum Level); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Attributes )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__out long *plAttr); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Attributes )( __RPC__in _ADOConnection * This, /* [in] */ long lAttr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CursorLocation )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__out CursorLocationEnum *plCursorLoc); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CursorLocation )( __RPC__in _ADOConnection * This, /* [in] */ CursorLocationEnum lCursorLoc); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Mode )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__out ConnectModeEnum *plMode); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Mode )( __RPC__in _ADOConnection * This, /* [in] */ ConnectModeEnum lMode); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Provider )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Provider )( __RPC__in _ADOConnection * This, /* [in] */ __RPC__in BSTR Provider); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( __RPC__in _ADOConnection * This, /* [retval][out] */ __RPC__out LONG *plObjState); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *OpenSchema )( __RPC__in _ADOConnection * This, /* [in] */ SchemaEnum Schema, /* [optional][in] */ VARIANT Restrictions, /* [optional][in] */ VARIANT SchemaID, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **pprset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Cancel )( __RPC__in _ADOConnection * This); END_INTERFACE } _ConnectionVtbl; interface _Connection { CONST_VTBL struct _ConnectionVtbl *lpVtbl; }; #ifdef COBJMACROS #define _Connection_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _Connection_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define _Connection_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define _Connection_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _Connection_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _Connection_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _Connection_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _Connection_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define _Connection_get_ConnectionString(This,pbstr) \ ( (This)->lpVtbl -> get_ConnectionString(This,pbstr) ) #define _Connection_put_ConnectionString(This,bstr) \ ( (This)->lpVtbl -> put_ConnectionString(This,bstr) ) #define _Connection_get_CommandTimeout(This,plTimeout) \ ( (This)->lpVtbl -> get_CommandTimeout(This,plTimeout) ) #define _Connection_put_CommandTimeout(This,lTimeout) \ ( (This)->lpVtbl -> put_CommandTimeout(This,lTimeout) ) #define _Connection_get_ConnectionTimeout(This,plTimeout) \ ( (This)->lpVtbl -> get_ConnectionTimeout(This,plTimeout) ) #define _Connection_put_ConnectionTimeout(This,lTimeout) \ ( (This)->lpVtbl -> put_ConnectionTimeout(This,lTimeout) ) #define _Connection_get_Version(This,pbstr) \ ( (This)->lpVtbl -> get_Version(This,pbstr) ) #define _Connection_Close(This) \ ( (This)->lpVtbl -> Close(This) ) #define _Connection_Execute(This,CommandText,RecordsAffected,Options,ppiRset) \ ( (This)->lpVtbl -> Execute(This,CommandText,RecordsAffected,Options,ppiRset) ) #define _Connection_BeginTrans(This,TransactionLevel) \ ( (This)->lpVtbl -> BeginTrans(This,TransactionLevel) ) #define _Connection_CommitTrans(This) \ ( (This)->lpVtbl -> CommitTrans(This) ) #define _Connection_RollbackTrans(This) \ ( (This)->lpVtbl -> RollbackTrans(This) ) #define _Connection_Open(This,ConnectionString,UserID,Password,Options) \ ( (This)->lpVtbl -> Open(This,ConnectionString,UserID,Password,Options) ) #define _Connection_get_Errors(This,ppvObject) \ ( (This)->lpVtbl -> get_Errors(This,ppvObject) ) #define _Connection_get_DefaultDatabase(This,pbstr) \ ( (This)->lpVtbl -> get_DefaultDatabase(This,pbstr) ) #define _Connection_put_DefaultDatabase(This,bstr) \ ( (This)->lpVtbl -> put_DefaultDatabase(This,bstr) ) #define _Connection_get_IsolationLevel(This,Level) \ ( (This)->lpVtbl -> get_IsolationLevel(This,Level) ) #define _Connection_put_IsolationLevel(This,Level) \ ( (This)->lpVtbl -> put_IsolationLevel(This,Level) ) #define _Connection_get_Attributes(This,plAttr) \ ( (This)->lpVtbl -> get_Attributes(This,plAttr) ) #define _Connection_put_Attributes(This,lAttr) \ ( (This)->lpVtbl -> put_Attributes(This,lAttr) ) #define _Connection_get_CursorLocation(This,plCursorLoc) \ ( (This)->lpVtbl -> get_CursorLocation(This,plCursorLoc) ) #define _Connection_put_CursorLocation(This,lCursorLoc) \ ( (This)->lpVtbl -> put_CursorLocation(This,lCursorLoc) ) #define _Connection_get_Mode(This,plMode) \ ( (This)->lpVtbl -> get_Mode(This,plMode) ) #define _Connection_put_Mode(This,lMode) \ ( (This)->lpVtbl -> put_Mode(This,lMode) ) #define _Connection_get_Provider(This,pbstr) \ ( (This)->lpVtbl -> get_Provider(This,pbstr) ) #define _Connection_put_Provider(This,Provider) \ ( (This)->lpVtbl -> put_Provider(This,Provider) ) #define _Connection_get_State(This,plObjState) \ ( (This)->lpVtbl -> get_State(This,plObjState) ) #define _Connection_OpenSchema(This,Schema,Restrictions,SchemaID,pprset) \ ( (This)->lpVtbl -> OpenSchema(This,Schema,Restrictions,SchemaID,pprset) ) #define _Connection_Cancel(This) \ ( (This)->lpVtbl -> Cancel(This) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* ___Connection_INTERFACE_DEFINED__ */ #ifndef __ADOConnectionConstruction15_INTERFACE_DEFINED__ #define __ADOConnectionConstruction15_INTERFACE_DEFINED__ /* interface ADOConnectionConstruction15 */ /* [object][uuid][restricted] */ EXTERN_C const IID IID_ADOConnectionConstruction15; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000516-0000-0010-8000-00AA006D2EA4") ADOConnectionConstruction15 : public IUnknown { public: virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DSO( /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppDSO) = 0; virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Session( /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppSession) = 0; virtual HRESULT STDMETHODCALLTYPE WrapDSOandSession( /* [in] */ __RPC__in_opt IUnknown *pDSO, /* [in] */ __RPC__in_opt IUnknown *pSession) = 0; }; #else /* C style interface */ typedef struct ADOConnectionConstruction15Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOConnectionConstruction15 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOConnectionConstruction15 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOConnectionConstruction15 * This); /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DSO )( __RPC__in ADOConnectionConstruction15 * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppDSO); /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( __RPC__in ADOConnectionConstruction15 * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppSession); HRESULT ( STDMETHODCALLTYPE *WrapDSOandSession )( __RPC__in ADOConnectionConstruction15 * This, /* [in] */ __RPC__in_opt IUnknown *pDSO, /* [in] */ __RPC__in_opt IUnknown *pSession); END_INTERFACE } ADOConnectionConstruction15Vtbl; interface ADOConnectionConstruction15 { CONST_VTBL struct ADOConnectionConstruction15Vtbl *lpVtbl; }; #ifdef COBJMACROS #define ADOConnectionConstruction15_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ADOConnectionConstruction15_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define ADOConnectionConstruction15_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define ADOConnectionConstruction15_get_DSO(This,ppDSO) \ ( (This)->lpVtbl -> get_DSO(This,ppDSO) ) #define ADOConnectionConstruction15_get_Session(This,ppSession) \ ( (This)->lpVtbl -> get_Session(This,ppSession) ) #define ADOConnectionConstruction15_WrapDSOandSession(This,pDSO,pSession) \ ( (This)->lpVtbl -> WrapDSOandSession(This,pDSO,pSession) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __ADOConnectionConstruction15_INTERFACE_DEFINED__ */ #ifndef __ADOConnectionConstruction_INTERFACE_DEFINED__ #define __ADOConnectionConstruction_INTERFACE_DEFINED__ /* interface ADOConnectionConstruction */ /* [object][uuid][restricted] */ EXTERN_C const IID IID_ADOConnectionConstruction; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000551-0000-0010-8000-00AA006D2EA4") ADOConnectionConstruction : public ADOConnectionConstruction15 { public: }; #else /* C style interface */ typedef struct ADOConnectionConstructionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOConnectionConstruction * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOConnectionConstruction * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOConnectionConstruction * This); /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DSO )( __RPC__in ADOConnectionConstruction * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppDSO); /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( __RPC__in ADOConnectionConstruction * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppSession); HRESULT ( STDMETHODCALLTYPE *WrapDSOandSession )( __RPC__in ADOConnectionConstruction * This, /* [in] */ __RPC__in_opt IUnknown *pDSO, /* [in] */ __RPC__in_opt IUnknown *pSession); END_INTERFACE } ADOConnectionConstructionVtbl; interface ADOConnectionConstruction { CONST_VTBL struct ADOConnectionConstructionVtbl *lpVtbl; }; #ifdef COBJMACROS #define ADOConnectionConstruction_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ADOConnectionConstruction_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define ADOConnectionConstruction_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define ADOConnectionConstruction_get_DSO(This,ppDSO) \ ( (This)->lpVtbl -> get_DSO(This,ppDSO) ) #define ADOConnectionConstruction_get_Session(This,ppSession) \ ( (This)->lpVtbl -> get_Session(This,ppSession) ) #define ADOConnectionConstruction_WrapDSOandSession(This,pDSO,pSession) \ ( (This)->lpVtbl -> WrapDSOandSession(This,pDSO,pSession) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __ADOConnectionConstruction_INTERFACE_DEFINED__ */ EXTERN_C const CLSID CLSID_Connection; #ifdef __cplusplus Connection; #endif #ifndef ___Record_INTERFACE_DEFINED__ #define ___Record_INTERFACE_DEFINED__ /* interface _ADORecord */ /* [object][uuid][helpcontext][hidden][dual] */ EXTERN_C const IID IID__Record; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001562-0000-0010-8000-00AA006D2EA4") _ADORecord : public _ADO { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_ActiveConnection( /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_ActiveConnection( /* [in] */ __RPC__in BSTR bstrConn) = 0; virtual /* [helpcontext][propputref][id] */ HRESULT STDMETHODCALLTYPE putref_ActiveConnection( /* [in] */ __RPC__in_opt _ADOConnection *Con) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ __RPC__out ObjectStateEnum *pState) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Source( /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Source( /* [in] */ __RPC__in BSTR Source) = 0; virtual /* [helpcontext][propputref][id] */ HRESULT STDMETHODCALLTYPE putref_Source( /* [in] */ __RPC__in_opt IDispatch *Source) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Mode( /* [retval][out] */ __RPC__out ConnectModeEnum *pMode) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Mode( /* [in] */ ConnectModeEnum Mode) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_ParentURL( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrParentURL) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE MoveRecord( /* [defaultvalue][in] */ __RPC__in BSTR Source, /* [defaultvalue][in] */ __RPC__in BSTR Destination, /* [defaultvalue][in] */ __RPC__in BSTR UserName, /* [defaultvalue][in] */ __RPC__in BSTR Password, /* [defaultvalue][in] */ MoveRecordOptionsEnum Options, /* [defaultvalue][in] */ VARIANT_BOOL Async, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrNewURL) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE CopyRecord( /* [defaultvalue][in] */ __RPC__in BSTR Source, /* [defaultvalue][in] */ __RPC__in BSTR Destination, /* [defaultvalue][in] */ __RPC__in BSTR UserName, /* [defaultvalue][in] */ __RPC__in BSTR Password, /* [defaultvalue][in] */ CopyRecordOptionsEnum Options, /* [defaultvalue][in] */ VARIANT_BOOL Async, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrNewURL) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE DeleteRecord( /* [defaultvalue][in] */ __RPC__in BSTR Source = (BSTR)NULL, /* [defaultvalue][in] */ VARIANT_BOOL Async = 0) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Open( /* [optional][in] */ VARIANT Source, /* [optional][in] */ VARIANT ActiveConnection, /* [defaultvalue][in] */ ConnectModeEnum Mode = adModeUnknown, /* [defaultvalue][in] */ RecordCreateOptionsEnum CreateOptions = adFailIfNotExists, /* [defaultvalue][in] */ RecordOpenOptionsEnum Options = adOpenRecordUnspecified, /* [defaultvalue][in] */ __RPC__in BSTR UserName = (BSTR)NULL, /* [defaultvalue][in] */ __RPC__in BSTR Password = (BSTR)NULL) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Close( void) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Fields( /* [retval][out] */ __RPC__deref_out_opt ADOFields **ppFlds) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_RecordType( /* [retval][out] */ __RPC__out RecordTypeEnum *pType) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE GetChildren( /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppRSet) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Cancel( void) = 0; }; #else /* C style interface */ typedef struct _RecordVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in _ADORecord * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in _ADORecord * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in _ADORecord * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in _ADORecord * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in _ADORecord * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in _ADORecord * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( _ADORecord * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in _ADORecord * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveConnection )( __RPC__in _ADORecord * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ActiveConnection )( __RPC__in _ADORecord * This, /* [in] */ __RPC__in BSTR bstrConn); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_ActiveADOConnection )( __RPC__in _ADORecord * This, /* [in] */ __RPC__in_opt _ADOConnection *Con); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_State )( __RPC__in _ADORecord * This, /* [retval][out] */ __RPC__out ObjectStateEnum *pState); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( __RPC__in _ADORecord * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Source )( __RPC__in _ADORecord * This, /* [in] */ __RPC__in BSTR Source); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_Source )( __RPC__in _ADORecord * This, /* [in] */ __RPC__in_opt IDispatch *Source); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Mode )( __RPC__in _ADORecord * This, /* [retval][out] */ __RPC__out ConnectModeEnum *pMode); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Mode )( __RPC__in _ADORecord * This, /* [in] */ ConnectModeEnum Mode); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ParentURL )( __RPC__in _ADORecord * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrParentURL); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveADORecord )( __RPC__in _ADORecord * This, /* [defaultvalue][in] */ __RPC__in BSTR Source, /* [defaultvalue][in] */ __RPC__in BSTR Destination, /* [defaultvalue][in] */ __RPC__in BSTR UserName, /* [defaultvalue][in] */ __RPC__in BSTR Password, /* [defaultvalue][in] */ MoveRecordOptionsEnum Options, /* [defaultvalue][in] */ VARIANT_BOOL Async, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrNewURL); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CopyADORecord )( __RPC__in _ADORecord * This, /* [defaultvalue][in] */ __RPC__in BSTR Source, /* [defaultvalue][in] */ __RPC__in BSTR Destination, /* [defaultvalue][in] */ __RPC__in BSTR UserName, /* [defaultvalue][in] */ __RPC__in BSTR Password, /* [defaultvalue][in] */ CopyRecordOptionsEnum Options, /* [defaultvalue][in] */ VARIANT_BOOL Async, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrNewURL); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *DeleteADORecord )( __RPC__in _ADORecord * This, /* [defaultvalue][in] */ __RPC__in BSTR Source, /* [defaultvalue][in] */ VARIANT_BOOL Async); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Open )( __RPC__in _ADORecord * This, /* [optional][in] */ VARIANT Source, /* [optional][in] */ VARIANT ActiveConnection, /* [defaultvalue][in] */ ConnectModeEnum Mode, /* [defaultvalue][in] */ RecordCreateOptionsEnum CreateOptions, /* [defaultvalue][in] */ RecordOpenOptionsEnum Options, /* [defaultvalue][in] */ __RPC__in BSTR UserName, /* [defaultvalue][in] */ __RPC__in BSTR Password); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Close )( __RPC__in _ADORecord * This); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Fields )( __RPC__in _ADORecord * This, /* [retval][out] */ __RPC__deref_out_opt ADOFields **ppFlds); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_RecordType )( __RPC__in _ADORecord * This, /* [retval][out] */ __RPC__out RecordTypeEnum *pType); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetChildren )( __RPC__in _ADORecord * This, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppRSet); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Cancel )( __RPC__in _ADORecord * This); END_INTERFACE } _RecordVtbl; interface _Record { CONST_VTBL struct _RecordVtbl *lpVtbl; }; #ifdef COBJMACROS #define _Record_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _Record_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define _Record_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define _Record_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _Record_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _Record_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _Record_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _Record_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define _Record_get_ActiveConnection(This,pvar) \ ( (This)->lpVtbl -> get_ActiveConnection(This,pvar) ) #define _Record_put_ActiveConnection(This,bstrConn) \ ( (This)->lpVtbl -> put_ActiveConnection(This,bstrConn) ) #define _Record_putref_ActiveConnection(This,Con) \ ( (This)->lpVtbl -> putref_ActiveConnection(This,Con) ) #define _Record_get_State(This,pState) \ ( (This)->lpVtbl -> get_State(This,pState) ) #define _Record_get_Source(This,pvar) \ ( (This)->lpVtbl -> get_Source(This,pvar) ) #define _Record_put_Source(This,Source) \ ( (This)->lpVtbl -> put_Source(This,Source) ) #define _Record_putref_Source(This,Source) \ ( (This)->lpVtbl -> putref_Source(This,Source) ) #define _Record_get_Mode(This,pMode) \ ( (This)->lpVtbl -> get_Mode(This,pMode) ) #define _Record_put_Mode(This,Mode) \ ( (This)->lpVtbl -> put_Mode(This,Mode) ) #define _Record_get_ParentURL(This,pbstrParentURL) \ ( (This)->lpVtbl -> get_ParentURL(This,pbstrParentURL) ) #define _Record_MoveRecord(This,Source,Destination,UserName,Password,Options,Async,pbstrNewURL) \ ( (This)->lpVtbl -> MoveRecord(This,Source,Destination,UserName,Password,Options,Async,pbstrNewURL) ) #define _Record_CopyRecord(This,Source,Destination,UserName,Password,Options,Async,pbstrNewURL) \ ( (This)->lpVtbl -> CopyRecord(This,Source,Destination,UserName,Password,Options,Async,pbstrNewURL) ) #define _Record_DeleteRecord(This,Source,Async) \ ( (This)->lpVtbl -> DeleteRecord(This,Source,Async) ) #define _Record_Open(This,Source,ActiveConnection,Mode,CreateOptions,Options,UserName,Password) \ ( (This)->lpVtbl -> Open(This,Source,ActiveConnection,Mode,CreateOptions,Options,UserName,Password) ) #define _Record_Close(This) \ ( (This)->lpVtbl -> Close(This) ) #define _Record_get_Fields(This,ppFlds) \ ( (This)->lpVtbl -> get_Fields(This,ppFlds) ) #define _Record_get_RecordType(This,pType) \ ( (This)->lpVtbl -> get_RecordType(This,pType) ) #define _Record_GetChildren(This,ppRSet) \ ( (This)->lpVtbl -> GetChildren(This,ppRSet) ) #define _Record_Cancel(This) \ ( (This)->lpVtbl -> Cancel(This) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* ___Record_INTERFACE_DEFINED__ */ EXTERN_C const CLSID CLSID_Record; #ifdef __cplusplus Record; #endif #ifndef ___Stream_INTERFACE_DEFINED__ #define ___Stream_INTERFACE_DEFINED__ /* interface _ADOStream */ /* [object][helpcontext][uuid][hidden][dual] */ EXTERN_C const IID IID__Stream; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001565-0000-0010-8000-00AA006D2EA4") _ADOStream : public IDispatch { public: virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Size( /* [retval][out] */ __RPC__out long *pSize) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_EOS( /* [retval][out] */ __RPC__out VARIANT_BOOL *pEOS) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Position( /* [retval][out] */ __RPC__out long *pPos) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_Position( /* [in] */ long Position) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Type( /* [retval][out] */ __RPC__out StreamTypeEnum *pType) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_Type( /* [in] */ StreamTypeEnum Type) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_LineSeparator( /* [retval][out] */ __RPC__out LineSeparatorEnum *pLS) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_LineSeparator( /* [in] */ LineSeparatorEnum LineSeparator) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ __RPC__out ObjectStateEnum *pState) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Mode( /* [retval][out] */ __RPC__out ConnectModeEnum *pMode) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_Mode( /* [in] */ ConnectModeEnum Mode) = 0; virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Charset( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrCharset) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_Charset( /* [in] */ __RPC__in BSTR Charset) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Read( /* [defaultvalue][in] */ long NumBytes, /* [retval][out] */ __RPC__out VARIANT *pVal) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Open( /* [optional][in] */ VARIANT Source, /* [defaultvalue][in] */ ConnectModeEnum Mode = adModeUnknown, /* [defaultvalue][in] */ StreamOpenOptionsEnum Options = adOpenStreamUnspecified, /* [defaultvalue][in] */ __RPC__in BSTR UserName = (BSTR)NULL, /* [defaultvalue][in] */ __RPC__in BSTR Password = (BSTR)NULL) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Close( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE SkipLine( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Write( /* [in] */ VARIANT Buffer) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE SetEOS( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE CopyTo( /* [in] */ __RPC__in_opt _ADOStream *DestStream, /* [defaultvalue][in] */ long CharNumber = -1) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Flush( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE SaveToFile( /* [in] */ __RPC__in BSTR FileName, /* [defaultvalue][in] */ SaveOptionsEnum Options = adSaveCreateNotExist) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE LoadFromFile( /* [in] */ __RPC__in BSTR FileName) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE ReadText( /* [defaultvalue][in] */ long NumChars, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE WriteText( /* [in] */ __RPC__in BSTR Data, /* [defaultvalue][in] */ StreamWriteEnum Options = adWriteChar) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Cancel( void) = 0; }; #else /* C style interface */ typedef struct _StreamVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in _ADOStream * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in _ADOStream * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in _ADOStream * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in _ADOStream * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in _ADOStream * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in _ADOStream * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( _ADOStream * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Size )( __RPC__in _ADOStream * This, /* [retval][out] */ __RPC__out long *pSize); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EOS )( __RPC__in _ADOStream * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pEOS); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Position )( __RPC__in _ADOStream * This, /* [retval][out] */ __RPC__out long *pPos); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Position )( __RPC__in _ADOStream * This, /* [in] */ long Position); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( __RPC__in _ADOStream * This, /* [retval][out] */ __RPC__out StreamTypeEnum *pType); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Type )( __RPC__in _ADOStream * This, /* [in] */ StreamTypeEnum Type); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LineSeparator )( __RPC__in _ADOStream * This, /* [retval][out] */ __RPC__out LineSeparatorEnum *pLS); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LineSeparator )( __RPC__in _ADOStream * This, /* [in] */ LineSeparatorEnum LineSeparator); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( __RPC__in _ADOStream * This, /* [retval][out] */ __RPC__out ObjectStateEnum *pState); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Mode )( __RPC__in _ADOStream * This, /* [retval][out] */ __RPC__out ConnectModeEnum *pMode); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Mode )( __RPC__in _ADOStream * This, /* [in] */ ConnectModeEnum Mode); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Charset )( __RPC__in _ADOStream * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrCharset); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Charset )( __RPC__in _ADOStream * This, /* [in] */ __RPC__in BSTR Charset); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Read )( __RPC__in _ADOStream * This, /* [defaultvalue][in] */ long NumBytes, /* [retval][out] */ __RPC__out VARIANT *pVal); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Open )( __RPC__in _ADOStream * This, /* [optional][in] */ VARIANT Source, /* [defaultvalue][in] */ ConnectModeEnum Mode, /* [defaultvalue][in] */ StreamOpenOptionsEnum Options, /* [defaultvalue][in] */ __RPC__in BSTR UserName, /* [defaultvalue][in] */ __RPC__in BSTR Password); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Close )( __RPC__in _ADOStream * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *SkipLine )( __RPC__in _ADOStream * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Write )( __RPC__in _ADOStream * This, /* [in] */ VARIANT Buffer); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *SetEOS )( __RPC__in _ADOStream * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CopyTo )( __RPC__in _ADOStream * This, /* [in] */ __RPC__in_opt _ADOStream *DestStream, /* [defaultvalue][in] */ long CharNumber); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Flush )( __RPC__in _ADOStream * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *SaveToFile )( __RPC__in _ADOStream * This, /* [in] */ __RPC__in BSTR FileName, /* [defaultvalue][in] */ SaveOptionsEnum Options); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *LoadFromFile )( __RPC__in _ADOStream * This, /* [in] */ __RPC__in BSTR FileName); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *ReadText )( __RPC__in _ADOStream * This, /* [defaultvalue][in] */ long NumChars, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *WriteText )( __RPC__in _ADOStream * This, /* [in] */ __RPC__in BSTR Data, /* [defaultvalue][in] */ StreamWriteEnum Options); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Cancel )( __RPC__in _ADOStream * This); END_INTERFACE } _StreamVtbl; interface _Stream { CONST_VTBL struct _StreamVtbl *lpVtbl; }; #ifdef COBJMACROS #define _Stream_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _Stream_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define _Stream_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define _Stream_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _Stream_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _Stream_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _Stream_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _Stream_get_Size(This,pSize) \ ( (This)->lpVtbl -> get_Size(This,pSize) ) #define _Stream_get_EOS(This,pEOS) \ ( (This)->lpVtbl -> get_EOS(This,pEOS) ) #define _Stream_get_Position(This,pPos) \ ( (This)->lpVtbl -> get_Position(This,pPos) ) #define _Stream_put_Position(This,Position) \ ( (This)->lpVtbl -> put_Position(This,Position) ) #define _Stream_get_Type(This,pType) \ ( (This)->lpVtbl -> get_Type(This,pType) ) #define _Stream_put_Type(This,Type) \ ( (This)->lpVtbl -> put_Type(This,Type) ) #define _Stream_get_LineSeparator(This,pLS) \ ( (This)->lpVtbl -> get_LineSeparator(This,pLS) ) #define _Stream_put_LineSeparator(This,LineSeparator) \ ( (This)->lpVtbl -> put_LineSeparator(This,LineSeparator) ) #define _Stream_get_State(This,pState) \ ( (This)->lpVtbl -> get_State(This,pState) ) #define _Stream_get_Mode(This,pMode) \ ( (This)->lpVtbl -> get_Mode(This,pMode) ) #define _Stream_put_Mode(This,Mode) \ ( (This)->lpVtbl -> put_Mode(This,Mode) ) #define _Stream_get_Charset(This,pbstrCharset) \ ( (This)->lpVtbl -> get_Charset(This,pbstrCharset) ) #define _Stream_put_Charset(This,Charset) \ ( (This)->lpVtbl -> put_Charset(This,Charset) ) #define _Stream_Read(This,NumBytes,pVal) \ ( (This)->lpVtbl -> Read(This,NumBytes,pVal) ) #define _Stream_Open(This,Source,Mode,Options,UserName,Password) \ ( (This)->lpVtbl -> Open(This,Source,Mode,Options,UserName,Password) ) #define _Stream_Close(This) \ ( (This)->lpVtbl -> Close(This) ) #define _Stream_SkipLine(This) \ ( (This)->lpVtbl -> SkipLine(This) ) #define _Stream_Write(This,Buffer) \ ( (This)->lpVtbl -> Write(This,Buffer) ) #define _Stream_SetEOS(This) \ ( (This)->lpVtbl -> SetEOS(This) ) #define _Stream_CopyTo(This,DestStream,CharNumber) \ ( (This)->lpVtbl -> CopyTo(This,DestStream,CharNumber) ) #define _Stream_Flush(This) \ ( (This)->lpVtbl -> Flush(This) ) #define _Stream_SaveToFile(This,FileName,Options) \ ( (This)->lpVtbl -> SaveToFile(This,FileName,Options) ) #define _Stream_LoadFromFile(This,FileName) \ ( (This)->lpVtbl -> LoadFromFile(This,FileName) ) #define _Stream_ReadText(This,NumChars,pbstr) \ ( (This)->lpVtbl -> ReadText(This,NumChars,pbstr) ) #define _Stream_WriteText(This,Data,Options) \ ( (This)->lpVtbl -> WriteText(This,Data,Options) ) #define _Stream_Cancel(This) \ ( (This)->lpVtbl -> Cancel(This) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* ___Stream_INTERFACE_DEFINED__ */ EXTERN_C const CLSID CLSID_Stream; #ifdef __cplusplus Stream; #endif #ifndef __ADORecordConstruction_INTERFACE_DEFINED__ #define __ADORecordConstruction_INTERFACE_DEFINED__ /* interface ADORecordConstruction */ /* [object][uuid][restricted] */ EXTERN_C const IID IID_ADORecordConstruction; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000567-0000-0010-8000-00AA006D2EA4") ADORecordConstruction : public IDispatch { public: virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Row( /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppRow) = 0; virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Row( /* [in] */ __RPC__in_opt IUnknown *pRow) = 0; virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ParentRow( /* [in] */ __RPC__in_opt IUnknown *pRow) = 0; }; #else /* C style interface */ typedef struct ADORecordConstructionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADORecordConstruction * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADORecordConstruction * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADORecordConstruction * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ADORecordConstruction * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ADORecordConstruction * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ADORecordConstruction * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ADORecordConstruction * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Row )( __RPC__in ADORecordConstruction * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppRow); /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Row )( __RPC__in ADORecordConstruction * This, /* [in] */ __RPC__in_opt IUnknown *pRow); /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ParentRow )( __RPC__in ADORecordConstruction * This, /* [in] */ __RPC__in_opt IUnknown *pRow); END_INTERFACE } ADORecordConstructionVtbl; interface ADORecordConstruction { CONST_VTBL struct ADORecordConstructionVtbl *lpVtbl; }; #ifdef COBJMACROS #define ADORecordConstruction_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ADORecordConstruction_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define ADORecordConstruction_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define ADORecordConstruction_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define ADORecordConstruction_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define ADORecordConstruction_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define ADORecordConstruction_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define ADORecordConstruction_get_Row(This,ppRow) \ ( (This)->lpVtbl -> get_Row(This,ppRow) ) #define ADORecordConstruction_put_Row(This,pRow) \ ( (This)->lpVtbl -> put_Row(This,pRow) ) #define ADORecordConstruction_put_ParentRow(This,pRow) \ ( (This)->lpVtbl -> put_ParentRow(This,pRow) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __ADORecordConstruction_INTERFACE_DEFINED__ */ #ifndef __ADOStreamConstruction_INTERFACE_DEFINED__ #define __ADOStreamConstruction_INTERFACE_DEFINED__ /* interface ADOStreamConstruction */ /* [object][uuid][restricted] */ EXTERN_C const IID IID_ADOStreamConstruction; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000568-0000-0010-8000-00AA006D2EA4") ADOStreamConstruction : public IDispatch { public: virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Stream( /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppStm) = 0; virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Stream( /* [in] */ __RPC__in_opt IUnknown *pStm) = 0; }; #else /* C style interface */ typedef struct ADOStreamConstructionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOStreamConstruction * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOStreamConstruction * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOStreamConstruction * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ADOStreamConstruction * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ADOStreamConstruction * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ADOStreamConstruction * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ADOStreamConstruction * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Stream )( __RPC__in ADOStreamConstruction * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppStm); /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Stream )( __RPC__in ADOStreamConstruction * This, /* [in] */ __RPC__in_opt IUnknown *pStm); END_INTERFACE } ADOStreamConstructionVtbl; interface ADOStreamConstruction { CONST_VTBL struct ADOStreamConstructionVtbl *lpVtbl; }; #ifdef COBJMACROS #define ADOStreamConstruction_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ADOStreamConstruction_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define ADOStreamConstruction_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define ADOStreamConstruction_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define ADOStreamConstruction_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define ADOStreamConstruction_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define ADOStreamConstruction_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define ADOStreamConstruction_get_Stream(This,ppStm) \ ( (This)->lpVtbl -> get_Stream(This,ppStm) ) #define ADOStreamConstruction_put_Stream(This,pStm) \ ( (This)->lpVtbl -> put_Stream(This,pStm) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __ADOStreamConstruction_INTERFACE_DEFINED__ */ #ifndef __ADOCommandConstruction_INTERFACE_DEFINED__ #define __ADOCommandConstruction_INTERFACE_DEFINED__ /* interface ADOCommandConstruction */ /* [object][uuid][restricted] */ EXTERN_C const IID IID_ADOCommandConstruction; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000517-0000-0010-8000-00AA006D2EA4") ADOCommandConstruction : public IUnknown { public: virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_OLEDBCommand( /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppOLEDBCommand) = 0; virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_OLEDBCommand( /* [in] */ __RPC__in_opt IUnknown *pOLEDBCommand) = 0; }; #else /* C style interface */ typedef struct ADOCommandConstructionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOCommandConstruction * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOCommandConstruction * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOCommandConstruction * This); /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_OLEDBCommand )( __RPC__in ADOCommandConstruction * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppOLEDBCommand); /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_OLEDBCommand )( __RPC__in ADOCommandConstruction * This, /* [in] */ __RPC__in_opt IUnknown *pOLEDBCommand); END_INTERFACE } ADOCommandConstructionVtbl; interface ADOCommandConstruction { CONST_VTBL struct ADOCommandConstructionVtbl *lpVtbl; }; #ifdef COBJMACROS #define ADOCommandConstruction_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ADOCommandConstruction_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define ADOCommandConstruction_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define ADOCommandConstruction_get_OLEDBCommand(This,ppOLEDBCommand) \ ( (This)->lpVtbl -> get_OLEDBCommand(This,ppOLEDBCommand) ) #define ADOCommandConstruction_put_OLEDBCommand(This,pOLEDBCommand) \ ( (This)->lpVtbl -> put_OLEDBCommand(This,pOLEDBCommand) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __ADOCommandConstruction_INTERFACE_DEFINED__ */ EXTERN_C const CLSID CLSID_Command; #ifdef __cplusplus Command; #endif EXTERN_C const CLSID CLSID_Recordset; #ifdef __cplusplus Recordset; #endif #ifndef __Recordset15_INTERFACE_DEFINED__ #define __Recordset15_INTERFACE_DEFINED__ /* interface Recordset15 */ /* [object][helpcontext][uuid][nonextensible][hidden][dual] */ EXTERN_C const IID IID_Recordset15; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("0000150E-0000-0010-8000-00AA006D2EA4") Recordset15 : public _ADO { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_AbsolutePosition( /* [retval][out] */ __RPC__out PositionEnum *pl) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_AbsolutePosition( /* [in] */ PositionEnum Position) = 0; virtual /* [helpcontext][propputref][id] */ HRESULT STDMETHODCALLTYPE putref_ActiveConnection( /* [in] */ __RPC__in_opt IDispatch *pconn) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_ActiveConnection( /* [in] */ VARIANT vConn) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_ActiveConnection( /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_BOF( /* [retval][out] */ __RPC__out VARIANT_BOOL *pb) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Bookmark( /* [retval][out] */ __RPC__out VARIANT *pvBookmark) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Bookmark( /* [in] */ VARIANT vBookmark) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_CacheSize( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_CacheSize( /* [in] */ long CacheSize) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_CursorType( /* [retval][out] */ __RPC__out CursorTypeEnum *plCursorType) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_CursorType( /* [in] */ CursorTypeEnum lCursorType) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_EOF( /* [retval][out] */ __RPC__out VARIANT_BOOL *pb) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Fields( /* [retval][out] */ __RPC__deref_out_opt ADOFields **ppvObject) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_LockType( /* [retval][out] */ __RPC__out LockTypeEnum *plLockType) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_LockType( /* [in] */ LockTypeEnum lLockType) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_MaxRecords( /* [retval][out] */ __RPC__out long *plMaxRecords) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_MaxRecords( /* [in] */ long lMaxRecords) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_RecordCount( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propputref][id] */ HRESULT STDMETHODCALLTYPE putref_Source( /* [in] */ __RPC__in_opt IDispatch *pcmd) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Source( /* [in] */ __RPC__in BSTR bstrConn) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Source( /* [retval][out] */ __RPC__out VARIANT *pvSource) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE AddNew( /* [optional][in] */ VARIANT FieldList, /* [optional][in] */ VARIANT Values) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE CancelUpdate( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Close( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Delete( /* [defaultvalue][in] */ AffectEnum AffectRecords = adAffectCurrent) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE GetRows( /* [defaultvalue][in] */ long Rows, /* [optional][in] */ VARIANT Start, /* [optional][in] */ VARIANT Fields, /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Move( /* [in] */ long NumRecords, /* [optional][in] */ VARIANT Start) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE MoveNext( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE MovePrevious( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE MoveFirst( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE MoveLast( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Open( /* [optional][in] */ VARIANT Source, /* [optional][in] */ VARIANT ActiveConnection, /* [defaultvalue][in] */ CursorTypeEnum CursorType = adOpenUnspecified, /* [defaultvalue][in] */ LockTypeEnum LockType = adLockUnspecified, /* [defaultvalue][in] */ LONG Options = adCmdUnspecified) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Requery( /* [defaultvalue][in] */ LONG Options = adOptionUnspecified) = 0; virtual /* [hidden] */ HRESULT STDMETHODCALLTYPE _xResync( /* [defaultvalue][in] */ AffectEnum AffectRecords = adAffectAll) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Update( /* [optional][in] */ VARIANT Fields, /* [optional][in] */ VARIANT Values) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_AbsolutePage( /* [retval][out] */ __RPC__out PositionEnum *pl) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_AbsolutePage( /* [in] */ PositionEnum Page) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_EditMode( /* [retval][out] */ __RPC__out EditModeEnum *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Filter( /* [retval][out] */ __RPC__out VARIANT *Criteria) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Filter( /* [in] */ VARIANT Criteria) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_PageCount( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_PageSize( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_PageSize( /* [in] */ long PageSize) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Sort( /* [retval][out] */ __RPC__deref_out_opt BSTR *Criteria) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Sort( /* [in] */ __RPC__in BSTR Criteria) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Status( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ __RPC__out LONG *plObjState) = 0; virtual /* [hidden] */ HRESULT STDMETHODCALLTYPE _xClone( /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppvObject) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE UpdateBatch( /* [defaultvalue][in] */ AffectEnum AffectRecords = adAffectAll) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE CancelBatch( /* [defaultvalue][in] */ AffectEnum AffectRecords = adAffectAll) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_CursorLocation( /* [retval][out] */ __RPC__out CursorLocationEnum *plCursorLoc) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_CursorLocation( /* [in] */ CursorLocationEnum lCursorLoc) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE NextRecordset( /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppiRs) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Supports( /* [in] */ CursorOptionEnum CursorOptions, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb) = 0; virtual /* [hidden][id][propget] */ HRESULT STDMETHODCALLTYPE get_Collect( /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [hidden][id][propput] */ HRESULT STDMETHODCALLTYPE put_Collect( /* [in] */ VARIANT Index, /* [in] */ VARIANT value) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_MarshalOptions( /* [retval][out] */ __RPC__out MarshalOptionsEnum *peMarshal) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_MarshalOptions( /* [in] */ MarshalOptionsEnum eMarshal) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Find( /* [in] */ __RPC__in BSTR Criteria, /* [defaultvalue][in] */ long SkipRecords, /* [defaultvalue][in] */ SearchDirectionEnum SearchDirection, /* [optional][in] */ VARIANT Start) = 0; }; #else /* C style interface */ typedef struct Recordset15Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in Recordset15 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in Recordset15 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in Recordset15 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in Recordset15 * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in Recordset15 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in Recordset15 * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( Recordset15 * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AbsolutePosition )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out PositionEnum *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AbsolutePosition )( __RPC__in Recordset15 * This, /* [in] */ PositionEnum Position); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_ActiveADOConnection )( __RPC__in Recordset15 * This, /* [in] */ __RPC__in_opt IDispatch *pconn); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ActiveConnection )( __RPC__in Recordset15 * This, /* [in] */ VARIANT vConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveConnection )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_BOF )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Bookmark )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out VARIANT *pvBookmark); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Bookmark )( __RPC__in Recordset15 * This, /* [in] */ VARIANT vBookmark); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CacheSize )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CacheSize )( __RPC__in Recordset15 * This, /* [in] */ long CacheSize); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CursorType )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out CursorTypeEnum *plCursorType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CursorType )( __RPC__in Recordset15 * This, /* [in] */ CursorTypeEnum lCursorType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_EOF )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Fields )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__deref_out_opt ADOFields **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_LockType )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out LockTypeEnum *plLockType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_LockType )( __RPC__in Recordset15 * This, /* [in] */ LockTypeEnum lLockType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_MaxRecords )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out long *plMaxRecords); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_MaxRecords )( __RPC__in Recordset15 * This, /* [in] */ long lMaxRecords); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_RecordCount )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_Source )( __RPC__in Recordset15 * This, /* [in] */ __RPC__in_opt IDispatch *pcmd); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Source )( __RPC__in Recordset15 * This, /* [in] */ __RPC__in BSTR bstrConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out VARIANT *pvSource); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *AddNew )( __RPC__in Recordset15 * This, /* [optional][in] */ VARIANT FieldList, /* [optional][in] */ VARIANT Values); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CancelUpdate )( __RPC__in Recordset15 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Close )( __RPC__in Recordset15 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Delete )( __RPC__in Recordset15 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetRows )( __RPC__in Recordset15 * This, /* [defaultvalue][in] */ long Rows, /* [optional][in] */ VARIANT Start, /* [optional][in] */ VARIANT Fields, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Move )( __RPC__in Recordset15 * This, /* [in] */ long NumRecords, /* [optional][in] */ VARIANT Start); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveNext )( __RPC__in Recordset15 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MovePrevious )( __RPC__in Recordset15 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveFirst )( __RPC__in Recordset15 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveLast )( __RPC__in Recordset15 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Open )( __RPC__in Recordset15 * This, /* [optional][in] */ VARIANT Source, /* [optional][in] */ VARIANT ActiveConnection, /* [defaultvalue][in] */ CursorTypeEnum CursorType, /* [defaultvalue][in] */ LockTypeEnum LockType, /* [defaultvalue][in] */ LONG Options); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Requery )( __RPC__in Recordset15 * This, /* [defaultvalue][in] */ LONG Options); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xResync )( __RPC__in Recordset15 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Update )( __RPC__in Recordset15 * This, /* [optional][in] */ VARIANT Fields, /* [optional][in] */ VARIANT Values); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AbsolutePage )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out PositionEnum *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AbsolutePage )( __RPC__in Recordset15 * This, /* [in] */ PositionEnum Page); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_EditMode )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out EditModeEnum *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Filter )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out VARIANT *Criteria); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Filter )( __RPC__in Recordset15 * This, /* [in] */ VARIANT Criteria); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_PageCount )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_PageSize )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_PageSize )( __RPC__in Recordset15 * This, /* [in] */ long PageSize); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Sort )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *Criteria); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Sort )( __RPC__in Recordset15 * This, /* [in] */ __RPC__in BSTR Criteria); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_State )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out LONG *plObjState); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xClone )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppvObject); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *UpdateBatch )( __RPC__in Recordset15 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CancelBatch )( __RPC__in Recordset15 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CursorLocation )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out CursorLocationEnum *plCursorLoc); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CursorLocation )( __RPC__in Recordset15 * This, /* [in] */ CursorLocationEnum lCursorLoc); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *NextADORecordset )( __RPC__in Recordset15 * This, /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppiRs); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Supports )( __RPC__in Recordset15 * This, /* [in] */ CursorOptionEnum CursorOptions, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Collect )( __RPC__in Recordset15 * This, /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Collect )( __RPC__in Recordset15 * This, /* [in] */ VARIANT Index, /* [in] */ VARIANT value); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_MarshalOptions )( __RPC__in Recordset15 * This, /* [retval][out] */ __RPC__out MarshalOptionsEnum *peMarshal); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_MarshalOptions )( __RPC__in Recordset15 * This, /* [in] */ MarshalOptionsEnum eMarshal); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Find )( __RPC__in Recordset15 * This, /* [in] */ __RPC__in BSTR Criteria, /* [defaultvalue][in] */ long SkipRecords, /* [defaultvalue][in] */ SearchDirectionEnum SearchDirection, /* [optional][in] */ VARIANT Start); END_INTERFACE } Recordset15Vtbl; interface Recordset15 { CONST_VTBL struct Recordset15Vtbl *lpVtbl; }; #ifdef COBJMACROS #define Recordset15_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Recordset15_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Recordset15_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Recordset15_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Recordset15_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Recordset15_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Recordset15_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Recordset15_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define Recordset15_get_AbsolutePosition(This,pl) \ ( (This)->lpVtbl -> get_AbsolutePosition(This,pl) ) #define Recordset15_put_AbsolutePosition(This,Position) \ ( (This)->lpVtbl -> put_AbsolutePosition(This,Position) ) #define Recordset15_putref_ActiveConnection(This,pconn) \ ( (This)->lpVtbl -> putref_ActiveConnection(This,pconn) ) #define Recordset15_put_ActiveConnection(This,vConn) \ ( (This)->lpVtbl -> put_ActiveConnection(This,vConn) ) #define Recordset15_get_ActiveConnection(This,pvar) \ ( (This)->lpVtbl -> get_ActiveConnection(This,pvar) ) #define Recordset15_get_BOF(This,pb) \ ( (This)->lpVtbl -> get_BOF(This,pb) ) #define Recordset15_get_Bookmark(This,pvBookmark) \ ( (This)->lpVtbl -> get_Bookmark(This,pvBookmark) ) #define Recordset15_put_Bookmark(This,vBookmark) \ ( (This)->lpVtbl -> put_Bookmark(This,vBookmark) ) #define Recordset15_get_CacheSize(This,pl) \ ( (This)->lpVtbl -> get_CacheSize(This,pl) ) #define Recordset15_put_CacheSize(This,CacheSize) \ ( (This)->lpVtbl -> put_CacheSize(This,CacheSize) ) #define Recordset15_get_CursorType(This,plCursorType) \ ( (This)->lpVtbl -> get_CursorType(This,plCursorType) ) #define Recordset15_put_CursorType(This,lCursorType) \ ( (This)->lpVtbl -> put_CursorType(This,lCursorType) ) #define Recordset15_get_EOF(This,pb) \ ( (This)->lpVtbl -> get_EOF(This,pb) ) #define Recordset15_get_Fields(This,ppvObject) \ ( (This)->lpVtbl -> get_Fields(This,ppvObject) ) #define Recordset15_get_LockType(This,plLockType) \ ( (This)->lpVtbl -> get_LockType(This,plLockType) ) #define Recordset15_put_LockType(This,lLockType) \ ( (This)->lpVtbl -> put_LockType(This,lLockType) ) #define Recordset15_get_MaxRecords(This,plMaxRecords) \ ( (This)->lpVtbl -> get_MaxRecords(This,plMaxRecords) ) #define Recordset15_put_MaxRecords(This,lMaxRecords) \ ( (This)->lpVtbl -> put_MaxRecords(This,lMaxRecords) ) #define Recordset15_get_RecordCount(This,pl) \ ( (This)->lpVtbl -> get_RecordCount(This,pl) ) #define Recordset15_putref_Source(This,pcmd) \ ( (This)->lpVtbl -> putref_Source(This,pcmd) ) #define Recordset15_put_Source(This,bstrConn) \ ( (This)->lpVtbl -> put_Source(This,bstrConn) ) #define Recordset15_get_Source(This,pvSource) \ ( (This)->lpVtbl -> get_Source(This,pvSource) ) #define Recordset15_AddNew(This,FieldList,Values) \ ( (This)->lpVtbl -> AddNew(This,FieldList,Values) ) #define Recordset15_CancelUpdate(This) \ ( (This)->lpVtbl -> CancelUpdate(This) ) #define Recordset15_Close(This) \ ( (This)->lpVtbl -> Close(This) ) #define Recordset15_Delete(This,AffectRecords) \ ( (This)->lpVtbl -> Delete(This,AffectRecords) ) #define Recordset15_GetRows(This,Rows,Start,Fields,pvar) \ ( (This)->lpVtbl -> GetRows(This,Rows,Start,Fields,pvar) ) #define Recordset15_Move(This,NumRecords,Start) \ ( (This)->lpVtbl -> Move(This,NumRecords,Start) ) #define Recordset15_MoveNext(This) \ ( (This)->lpVtbl -> MoveNext(This) ) #define Recordset15_MovePrevious(This) \ ( (This)->lpVtbl -> MovePrevious(This) ) #define Recordset15_MoveFirst(This) \ ( (This)->lpVtbl -> MoveFirst(This) ) #define Recordset15_MoveLast(This) \ ( (This)->lpVtbl -> MoveLast(This) ) #define Recordset15_Open(This,Source,ActiveConnection,CursorType,LockType,Options) \ ( (This)->lpVtbl -> Open(This,Source,ActiveConnection,CursorType,LockType,Options) ) #define Recordset15_Requery(This,Options) \ ( (This)->lpVtbl -> Requery(This,Options) ) #define Recordset15__xResync(This,AffectRecords) \ ( (This)->lpVtbl -> _xResync(This,AffectRecords) ) #define Recordset15_Update(This,Fields,Values) \ ( (This)->lpVtbl -> Update(This,Fields,Values) ) #define Recordset15_get_AbsolutePage(This,pl) \ ( (This)->lpVtbl -> get_AbsolutePage(This,pl) ) #define Recordset15_put_AbsolutePage(This,Page) \ ( (This)->lpVtbl -> put_AbsolutePage(This,Page) ) #define Recordset15_get_EditMode(This,pl) \ ( (This)->lpVtbl -> get_EditMode(This,pl) ) #define Recordset15_get_Filter(This,Criteria) \ ( (This)->lpVtbl -> get_Filter(This,Criteria) ) #define Recordset15_put_Filter(This,Criteria) \ ( (This)->lpVtbl -> put_Filter(This,Criteria) ) #define Recordset15_get_PageCount(This,pl) \ ( (This)->lpVtbl -> get_PageCount(This,pl) ) #define Recordset15_get_PageSize(This,pl) \ ( (This)->lpVtbl -> get_PageSize(This,pl) ) #define Recordset15_put_PageSize(This,PageSize) \ ( (This)->lpVtbl -> put_PageSize(This,PageSize) ) #define Recordset15_get_Sort(This,Criteria) \ ( (This)->lpVtbl -> get_Sort(This,Criteria) ) #define Recordset15_put_Sort(This,Criteria) \ ( (This)->lpVtbl -> put_Sort(This,Criteria) ) #define Recordset15_get_Status(This,pl) \ ( (This)->lpVtbl -> get_Status(This,pl) ) #define Recordset15_get_State(This,plObjState) \ ( (This)->lpVtbl -> get_State(This,plObjState) ) #define Recordset15__xClone(This,ppvObject) \ ( (This)->lpVtbl -> _xClone(This,ppvObject) ) #define Recordset15_UpdateBatch(This,AffectRecords) \ ( (This)->lpVtbl -> UpdateBatch(This,AffectRecords) ) #define Recordset15_CancelBatch(This,AffectRecords) \ ( (This)->lpVtbl -> CancelBatch(This,AffectRecords) ) #define Recordset15_get_CursorLocation(This,plCursorLoc) \ ( (This)->lpVtbl -> get_CursorLocation(This,plCursorLoc) ) #define Recordset15_put_CursorLocation(This,lCursorLoc) \ ( (This)->lpVtbl -> put_CursorLocation(This,lCursorLoc) ) #define Recordset15_NextRecordset(This,RecordsAffected,ppiRs) \ ( (This)->lpVtbl -> NextRecordset(This,RecordsAffected,ppiRs) ) #define Recordset15_Supports(This,CursorOptions,pb) \ ( (This)->lpVtbl -> Supports(This,CursorOptions,pb) ) #define Recordset15_get_Collect(This,Index,pvar) \ ( (This)->lpVtbl -> get_Collect(This,Index,pvar) ) #define Recordset15_put_Collect(This,Index,value) \ ( (This)->lpVtbl -> put_Collect(This,Index,value) ) #define Recordset15_get_MarshalOptions(This,peMarshal) \ ( (This)->lpVtbl -> get_MarshalOptions(This,peMarshal) ) #define Recordset15_put_MarshalOptions(This,eMarshal) \ ( (This)->lpVtbl -> put_MarshalOptions(This,eMarshal) ) #define Recordset15_Find(This,Criteria,SkipRecords,SearchDirection,Start) \ ( (This)->lpVtbl -> Find(This,Criteria,SkipRecords,SearchDirection,Start) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Recordset15_INTERFACE_DEFINED__ */ #ifndef __Recordset20_INTERFACE_DEFINED__ #define __Recordset20_INTERFACE_DEFINED__ /* interface Recordset20 */ /* [object][helpcontext][uuid][nonextensible][hidden][dual] */ EXTERN_C const IID IID_Recordset20; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("0000154F-0000-0010-8000-00AA006D2EA4") Recordset20 : public Recordset15 { public: virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Cancel( void) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_DataSource( /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppunkDataSource) = 0; virtual /* [helpcontext][propputref][id] */ HRESULT STDMETHODCALLTYPE putref_DataSource( /* [in] */ __RPC__in_opt IUnknown *punkDataSource) = 0; virtual /* [hidden] */ HRESULT STDMETHODCALLTYPE _xSave( /* [defaultvalue][in] */ __RPC__in BSTR FileName = (BSTR)NULL, /* [defaultvalue][in] */ PersistFormatEnum PersistFormat = adPersistADTG) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_ActiveCommand( /* [retval][out] */ __RPC__deref_out_opt IDispatch **ppCmd) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_StayInSync( /* [in] */ VARIANT_BOOL bStayInSync) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_StayInSync( /* [retval][out] */ __RPC__out VARIANT_BOOL *pbStayInSync) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE GetString( /* [defaultvalue][in] */ StringFormatEnum StringFormat, /* [defaultvalue][in] */ long NumRows, /* [defaultvalue][in] */ __RPC__in BSTR ColumnDelimeter, /* [defaultvalue][in] */ __RPC__in BSTR RowDelimeter, /* [defaultvalue][in] */ __RPC__in BSTR NullExpr, /* [retval][out] */ __RPC__deref_out_opt BSTR *pRetString) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_DataMember( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrDataMember) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_DataMember( /* [in] */ __RPC__in BSTR bstrDataMember) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE CompareBookmarks( /* [in] */ VARIANT Bookmark1, /* [in] */ VARIANT Bookmark2, /* [retval][out] */ __RPC__out CompareEnum *pCompare) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Clone( /* [defaultvalue][in] */ LockTypeEnum LockType, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppvObject) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Resync( /* [defaultvalue][in] */ AffectEnum AffectRecords = adAffectAll, /* [defaultvalue][in] */ ResyncEnum ResyncValues = adResyncAllValues) = 0; }; #else /* C style interface */ typedef struct Recordset20Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in Recordset20 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in Recordset20 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in Recordset20 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in Recordset20 * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in Recordset20 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in Recordset20 * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( Recordset20 * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AbsolutePosition )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out PositionEnum *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AbsolutePosition )( __RPC__in Recordset20 * This, /* [in] */ PositionEnum Position); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_ActiveADOConnection )( __RPC__in Recordset20 * This, /* [in] */ __RPC__in_opt IDispatch *pconn); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ActiveConnection )( __RPC__in Recordset20 * This, /* [in] */ VARIANT vConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveConnection )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_BOF )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Bookmark )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out VARIANT *pvBookmark); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Bookmark )( __RPC__in Recordset20 * This, /* [in] */ VARIANT vBookmark); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CacheSize )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CacheSize )( __RPC__in Recordset20 * This, /* [in] */ long CacheSize); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CursorType )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out CursorTypeEnum *plCursorType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CursorType )( __RPC__in Recordset20 * This, /* [in] */ CursorTypeEnum lCursorType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_EOF )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Fields )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__deref_out_opt ADOFields **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_LockType )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out LockTypeEnum *plLockType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_LockType )( __RPC__in Recordset20 * This, /* [in] */ LockTypeEnum lLockType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_MaxRecords )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out long *plMaxRecords); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_MaxRecords )( __RPC__in Recordset20 * This, /* [in] */ long lMaxRecords); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_RecordCount )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_Source )( __RPC__in Recordset20 * This, /* [in] */ __RPC__in_opt IDispatch *pcmd); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Source )( __RPC__in Recordset20 * This, /* [in] */ __RPC__in BSTR bstrConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out VARIANT *pvSource); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *AddNew )( __RPC__in Recordset20 * This, /* [optional][in] */ VARIANT FieldList, /* [optional][in] */ VARIANT Values); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CancelUpdate )( __RPC__in Recordset20 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Close )( __RPC__in Recordset20 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Delete )( __RPC__in Recordset20 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetRows )( __RPC__in Recordset20 * This, /* [defaultvalue][in] */ long Rows, /* [optional][in] */ VARIANT Start, /* [optional][in] */ VARIANT Fields, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Move )( __RPC__in Recordset20 * This, /* [in] */ long NumRecords, /* [optional][in] */ VARIANT Start); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveNext )( __RPC__in Recordset20 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MovePrevious )( __RPC__in Recordset20 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveFirst )( __RPC__in Recordset20 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveLast )( __RPC__in Recordset20 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Open )( __RPC__in Recordset20 * This, /* [optional][in] */ VARIANT Source, /* [optional][in] */ VARIANT ActiveConnection, /* [defaultvalue][in] */ CursorTypeEnum CursorType, /* [defaultvalue][in] */ LockTypeEnum LockType, /* [defaultvalue][in] */ LONG Options); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Requery )( __RPC__in Recordset20 * This, /* [defaultvalue][in] */ LONG Options); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xResync )( __RPC__in Recordset20 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Update )( __RPC__in Recordset20 * This, /* [optional][in] */ VARIANT Fields, /* [optional][in] */ VARIANT Values); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AbsolutePage )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out PositionEnum *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AbsolutePage )( __RPC__in Recordset20 * This, /* [in] */ PositionEnum Page); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_EditMode )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out EditModeEnum *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Filter )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out VARIANT *Criteria); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Filter )( __RPC__in Recordset20 * This, /* [in] */ VARIANT Criteria); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_PageCount )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_PageSize )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_PageSize )( __RPC__in Recordset20 * This, /* [in] */ long PageSize); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Sort )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *Criteria); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Sort )( __RPC__in Recordset20 * This, /* [in] */ __RPC__in BSTR Criteria); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_State )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out LONG *plObjState); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xClone )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppvObject); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *UpdateBatch )( __RPC__in Recordset20 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CancelBatch )( __RPC__in Recordset20 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CursorLocation )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out CursorLocationEnum *plCursorLoc); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CursorLocation )( __RPC__in Recordset20 * This, /* [in] */ CursorLocationEnum lCursorLoc); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *NextADORecordset )( __RPC__in Recordset20 * This, /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppiRs); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Supports )( __RPC__in Recordset20 * This, /* [in] */ CursorOptionEnum CursorOptions, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Collect )( __RPC__in Recordset20 * This, /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Collect )( __RPC__in Recordset20 * This, /* [in] */ VARIANT Index, /* [in] */ VARIANT value); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_MarshalOptions )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out MarshalOptionsEnum *peMarshal); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_MarshalOptions )( __RPC__in Recordset20 * This, /* [in] */ MarshalOptionsEnum eMarshal); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Find )( __RPC__in Recordset20 * This, /* [in] */ __RPC__in BSTR Criteria, /* [defaultvalue][in] */ long SkipRecords, /* [defaultvalue][in] */ SearchDirectionEnum SearchDirection, /* [optional][in] */ VARIANT Start); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Cancel )( __RPC__in Recordset20 * This); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DataSource )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppunkDataSource); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_DataSource )( __RPC__in Recordset20 * This, /* [in] */ __RPC__in_opt IUnknown *punkDataSource); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xSave )( __RPC__in Recordset20 * This, /* [defaultvalue][in] */ __RPC__in BSTR FileName, /* [defaultvalue][in] */ PersistFormatEnum PersistFormat); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveCommand )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__deref_out_opt IDispatch **ppCmd); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_StayInSync )( __RPC__in Recordset20 * This, /* [in] */ VARIANT_BOOL bStayInSync); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_StayInSync )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pbStayInSync); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetString )( __RPC__in Recordset20 * This, /* [defaultvalue][in] */ StringFormatEnum StringFormat, /* [defaultvalue][in] */ long NumRows, /* [defaultvalue][in] */ __RPC__in BSTR ColumnDelimeter, /* [defaultvalue][in] */ __RPC__in BSTR RowDelimeter, /* [defaultvalue][in] */ __RPC__in BSTR NullExpr, /* [retval][out] */ __RPC__deref_out_opt BSTR *pRetString); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DataMember )( __RPC__in Recordset20 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrDataMember); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_DataMember )( __RPC__in Recordset20 * This, /* [in] */ __RPC__in BSTR bstrDataMember); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CompareBookmarks )( __RPC__in Recordset20 * This, /* [in] */ VARIANT Bookmark1, /* [in] */ VARIANT Bookmark2, /* [retval][out] */ __RPC__out CompareEnum *pCompare); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( __RPC__in Recordset20 * This, /* [defaultvalue][in] */ LockTypeEnum LockType, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppvObject); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Resync )( __RPC__in Recordset20 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords, /* [defaultvalue][in] */ ResyncEnum ResyncValues); END_INTERFACE } Recordset20Vtbl; interface Recordset20 { CONST_VTBL struct Recordset20Vtbl *lpVtbl; }; #ifdef COBJMACROS #define Recordset20_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Recordset20_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Recordset20_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Recordset20_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Recordset20_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Recordset20_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Recordset20_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Recordset20_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define Recordset20_get_AbsolutePosition(This,pl) \ ( (This)->lpVtbl -> get_AbsolutePosition(This,pl) ) #define Recordset20_put_AbsolutePosition(This,Position) \ ( (This)->lpVtbl -> put_AbsolutePosition(This,Position) ) #define Recordset20_putref_ActiveConnection(This,pconn) \ ( (This)->lpVtbl -> putref_ActiveConnection(This,pconn) ) #define Recordset20_put_ActiveConnection(This,vConn) \ ( (This)->lpVtbl -> put_ActiveConnection(This,vConn) ) #define Recordset20_get_ActiveConnection(This,pvar) \ ( (This)->lpVtbl -> get_ActiveConnection(This,pvar) ) #define Recordset20_get_BOF(This,pb) \ ( (This)->lpVtbl -> get_BOF(This,pb) ) #define Recordset20_get_Bookmark(This,pvBookmark) \ ( (This)->lpVtbl -> get_Bookmark(This,pvBookmark) ) #define Recordset20_put_Bookmark(This,vBookmark) \ ( (This)->lpVtbl -> put_Bookmark(This,vBookmark) ) #define Recordset20_get_CacheSize(This,pl) \ ( (This)->lpVtbl -> get_CacheSize(This,pl) ) #define Recordset20_put_CacheSize(This,CacheSize) \ ( (This)->lpVtbl -> put_CacheSize(This,CacheSize) ) #define Recordset20_get_CursorType(This,plCursorType) \ ( (This)->lpVtbl -> get_CursorType(This,plCursorType) ) #define Recordset20_put_CursorType(This,lCursorType) \ ( (This)->lpVtbl -> put_CursorType(This,lCursorType) ) #define Recordset20_get_EOF(This,pb) \ ( (This)->lpVtbl -> get_EOF(This,pb) ) #define Recordset20_get_Fields(This,ppvObject) \ ( (This)->lpVtbl -> get_Fields(This,ppvObject) ) #define Recordset20_get_LockType(This,plLockType) \ ( (This)->lpVtbl -> get_LockType(This,plLockType) ) #define Recordset20_put_LockType(This,lLockType) \ ( (This)->lpVtbl -> put_LockType(This,lLockType) ) #define Recordset20_get_MaxRecords(This,plMaxRecords) \ ( (This)->lpVtbl -> get_MaxRecords(This,plMaxRecords) ) #define Recordset20_put_MaxRecords(This,lMaxRecords) \ ( (This)->lpVtbl -> put_MaxRecords(This,lMaxRecords) ) #define Recordset20_get_RecordCount(This,pl) \ ( (This)->lpVtbl -> get_RecordCount(This,pl) ) #define Recordset20_putref_Source(This,pcmd) \ ( (This)->lpVtbl -> putref_Source(This,pcmd) ) #define Recordset20_put_Source(This,bstrConn) \ ( (This)->lpVtbl -> put_Source(This,bstrConn) ) #define Recordset20_get_Source(This,pvSource) \ ( (This)->lpVtbl -> get_Source(This,pvSource) ) #define Recordset20_AddNew(This,FieldList,Values) \ ( (This)->lpVtbl -> AddNew(This,FieldList,Values) ) #define Recordset20_CancelUpdate(This) \ ( (This)->lpVtbl -> CancelUpdate(This) ) #define Recordset20_Close(This) \ ( (This)->lpVtbl -> Close(This) ) #define Recordset20_Delete(This,AffectRecords) \ ( (This)->lpVtbl -> Delete(This,AffectRecords) ) #define Recordset20_GetRows(This,Rows,Start,Fields,pvar) \ ( (This)->lpVtbl -> GetRows(This,Rows,Start,Fields,pvar) ) #define Recordset20_Move(This,NumRecords,Start) \ ( (This)->lpVtbl -> Move(This,NumRecords,Start) ) #define Recordset20_MoveNext(This) \ ( (This)->lpVtbl -> MoveNext(This) ) #define Recordset20_MovePrevious(This) \ ( (This)->lpVtbl -> MovePrevious(This) ) #define Recordset20_MoveFirst(This) \ ( (This)->lpVtbl -> MoveFirst(This) ) #define Recordset20_MoveLast(This) \ ( (This)->lpVtbl -> MoveLast(This) ) #define Recordset20_Open(This,Source,ActiveConnection,CursorType,LockType,Options) \ ( (This)->lpVtbl -> Open(This,Source,ActiveConnection,CursorType,LockType,Options) ) #define Recordset20_Requery(This,Options) \ ( (This)->lpVtbl -> Requery(This,Options) ) #define Recordset20__xResync(This,AffectRecords) \ ( (This)->lpVtbl -> _xResync(This,AffectRecords) ) #define Recordset20_Update(This,Fields,Values) \ ( (This)->lpVtbl -> Update(This,Fields,Values) ) #define Recordset20_get_AbsolutePage(This,pl) \ ( (This)->lpVtbl -> get_AbsolutePage(This,pl) ) #define Recordset20_put_AbsolutePage(This,Page) \ ( (This)->lpVtbl -> put_AbsolutePage(This,Page) ) #define Recordset20_get_EditMode(This,pl) \ ( (This)->lpVtbl -> get_EditMode(This,pl) ) #define Recordset20_get_Filter(This,Criteria) \ ( (This)->lpVtbl -> get_Filter(This,Criteria) ) #define Recordset20_put_Filter(This,Criteria) \ ( (This)->lpVtbl -> put_Filter(This,Criteria) ) #define Recordset20_get_PageCount(This,pl) \ ( (This)->lpVtbl -> get_PageCount(This,pl) ) #define Recordset20_get_PageSize(This,pl) \ ( (This)->lpVtbl -> get_PageSize(This,pl) ) #define Recordset20_put_PageSize(This,PageSize) \ ( (This)->lpVtbl -> put_PageSize(This,PageSize) ) #define Recordset20_get_Sort(This,Criteria) \ ( (This)->lpVtbl -> get_Sort(This,Criteria) ) #define Recordset20_put_Sort(This,Criteria) \ ( (This)->lpVtbl -> put_Sort(This,Criteria) ) #define Recordset20_get_Status(This,pl) \ ( (This)->lpVtbl -> get_Status(This,pl) ) #define Recordset20_get_State(This,plObjState) \ ( (This)->lpVtbl -> get_State(This,plObjState) ) #define Recordset20__xClone(This,ppvObject) \ ( (This)->lpVtbl -> _xClone(This,ppvObject) ) #define Recordset20_UpdateBatch(This,AffectRecords) \ ( (This)->lpVtbl -> UpdateBatch(This,AffectRecords) ) #define Recordset20_CancelBatch(This,AffectRecords) \ ( (This)->lpVtbl -> CancelBatch(This,AffectRecords) ) #define Recordset20_get_CursorLocation(This,plCursorLoc) \ ( (This)->lpVtbl -> get_CursorLocation(This,plCursorLoc) ) #define Recordset20_put_CursorLocation(This,lCursorLoc) \ ( (This)->lpVtbl -> put_CursorLocation(This,lCursorLoc) ) #define Recordset20_NextRecordset(This,RecordsAffected,ppiRs) \ ( (This)->lpVtbl -> NextRecordset(This,RecordsAffected,ppiRs) ) #define Recordset20_Supports(This,CursorOptions,pb) \ ( (This)->lpVtbl -> Supports(This,CursorOptions,pb) ) #define Recordset20_get_Collect(This,Index,pvar) \ ( (This)->lpVtbl -> get_Collect(This,Index,pvar) ) #define Recordset20_put_Collect(This,Index,value) \ ( (This)->lpVtbl -> put_Collect(This,Index,value) ) #define Recordset20_get_MarshalOptions(This,peMarshal) \ ( (This)->lpVtbl -> get_MarshalOptions(This,peMarshal) ) #define Recordset20_put_MarshalOptions(This,eMarshal) \ ( (This)->lpVtbl -> put_MarshalOptions(This,eMarshal) ) #define Recordset20_Find(This,Criteria,SkipRecords,SearchDirection,Start) \ ( (This)->lpVtbl -> Find(This,Criteria,SkipRecords,SearchDirection,Start) ) #define Recordset20_Cancel(This) \ ( (This)->lpVtbl -> Cancel(This) ) #define Recordset20_get_DataSource(This,ppunkDataSource) \ ( (This)->lpVtbl -> get_DataSource(This,ppunkDataSource) ) #define Recordset20_putref_DataSource(This,punkDataSource) \ ( (This)->lpVtbl -> putref_DataSource(This,punkDataSource) ) #define Recordset20__xSave(This,FileName,PersistFormat) \ ( (This)->lpVtbl -> _xSave(This,FileName,PersistFormat) ) #define Recordset20_get_ActiveCommand(This,ppCmd) \ ( (This)->lpVtbl -> get_ActiveCommand(This,ppCmd) ) #define Recordset20_put_StayInSync(This,bStayInSync) \ ( (This)->lpVtbl -> put_StayInSync(This,bStayInSync) ) #define Recordset20_get_StayInSync(This,pbStayInSync) \ ( (This)->lpVtbl -> get_StayInSync(This,pbStayInSync) ) #define Recordset20_GetString(This,StringFormat,NumRows,ColumnDelimeter,RowDelimeter,NullExpr,pRetString) \ ( (This)->lpVtbl -> GetString(This,StringFormat,NumRows,ColumnDelimeter,RowDelimeter,NullExpr,pRetString) ) #define Recordset20_get_DataMember(This,pbstrDataMember) \ ( (This)->lpVtbl -> get_DataMember(This,pbstrDataMember) ) #define Recordset20_put_DataMember(This,bstrDataMember) \ ( (This)->lpVtbl -> put_DataMember(This,bstrDataMember) ) #define Recordset20_CompareBookmarks(This,Bookmark1,Bookmark2,pCompare) \ ( (This)->lpVtbl -> CompareBookmarks(This,Bookmark1,Bookmark2,pCompare) ) #define Recordset20_Clone(This,LockType,ppvObject) \ ( (This)->lpVtbl -> Clone(This,LockType,ppvObject) ) #define Recordset20_Resync(This,AffectRecords,ResyncValues) \ ( (This)->lpVtbl -> Resync(This,AffectRecords,ResyncValues) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Recordset20_INTERFACE_DEFINED__ */ #ifndef __Recordset21_INTERFACE_DEFINED__ #define __Recordset21_INTERFACE_DEFINED__ /* interface Recordset21 */ /* [object][helpcontext][uuid][nonextensible][hidden][dual] */ EXTERN_C const IID IID_Recordset21; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001555-0000-0010-8000-00AA006D2EA4") Recordset21 : public Recordset20 { public: virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Seek( /* [in] */ VARIANT KeyValues, /* [defaultvalue][in] */ SeekEnum SeekOption = adSeekFirstEQ) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Index( /* [in] */ __RPC__in BSTR Index) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Index( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrIndex) = 0; }; #else /* C style interface */ typedef struct Recordset21Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in Recordset21 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in Recordset21 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in Recordset21 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in Recordset21 * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in Recordset21 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in Recordset21 * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( Recordset21 * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AbsolutePosition )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out PositionEnum *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AbsolutePosition )( __RPC__in Recordset21 * This, /* [in] */ PositionEnum Position); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_ActiveADOConnection )( __RPC__in Recordset21 * This, /* [in] */ __RPC__in_opt IDispatch *pconn); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ActiveConnection )( __RPC__in Recordset21 * This, /* [in] */ VARIANT vConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveConnection )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_BOF )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Bookmark )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out VARIANT *pvBookmark); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Bookmark )( __RPC__in Recordset21 * This, /* [in] */ VARIANT vBookmark); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CacheSize )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CacheSize )( __RPC__in Recordset21 * This, /* [in] */ long CacheSize); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CursorType )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out CursorTypeEnum *plCursorType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CursorType )( __RPC__in Recordset21 * This, /* [in] */ CursorTypeEnum lCursorType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_EOF )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Fields )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__deref_out_opt ADOFields **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_LockType )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out LockTypeEnum *plLockType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_LockType )( __RPC__in Recordset21 * This, /* [in] */ LockTypeEnum lLockType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_MaxRecords )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out long *plMaxRecords); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_MaxRecords )( __RPC__in Recordset21 * This, /* [in] */ long lMaxRecords); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_RecordCount )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_Source )( __RPC__in Recordset21 * This, /* [in] */ __RPC__in_opt IDispatch *pcmd); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Source )( __RPC__in Recordset21 * This, /* [in] */ __RPC__in BSTR bstrConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out VARIANT *pvSource); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *AddNew )( __RPC__in Recordset21 * This, /* [optional][in] */ VARIANT FieldList, /* [optional][in] */ VARIANT Values); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CancelUpdate )( __RPC__in Recordset21 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Close )( __RPC__in Recordset21 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Delete )( __RPC__in Recordset21 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetRows )( __RPC__in Recordset21 * This, /* [defaultvalue][in] */ long Rows, /* [optional][in] */ VARIANT Start, /* [optional][in] */ VARIANT Fields, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Move )( __RPC__in Recordset21 * This, /* [in] */ long NumRecords, /* [optional][in] */ VARIANT Start); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveNext )( __RPC__in Recordset21 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MovePrevious )( __RPC__in Recordset21 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveFirst )( __RPC__in Recordset21 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveLast )( __RPC__in Recordset21 * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Open )( __RPC__in Recordset21 * This, /* [optional][in] */ VARIANT Source, /* [optional][in] */ VARIANT ActiveConnection, /* [defaultvalue][in] */ CursorTypeEnum CursorType, /* [defaultvalue][in] */ LockTypeEnum LockType, /* [defaultvalue][in] */ LONG Options); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Requery )( __RPC__in Recordset21 * This, /* [defaultvalue][in] */ LONG Options); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xResync )( __RPC__in Recordset21 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Update )( __RPC__in Recordset21 * This, /* [optional][in] */ VARIANT Fields, /* [optional][in] */ VARIANT Values); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AbsolutePage )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out PositionEnum *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AbsolutePage )( __RPC__in Recordset21 * This, /* [in] */ PositionEnum Page); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_EditMode )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out EditModeEnum *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Filter )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out VARIANT *Criteria); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Filter )( __RPC__in Recordset21 * This, /* [in] */ VARIANT Criteria); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_PageCount )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_PageSize )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_PageSize )( __RPC__in Recordset21 * This, /* [in] */ long PageSize); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Sort )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *Criteria); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Sort )( __RPC__in Recordset21 * This, /* [in] */ __RPC__in BSTR Criteria); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_State )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out LONG *plObjState); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xClone )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppvObject); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *UpdateBatch )( __RPC__in Recordset21 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CancelBatch )( __RPC__in Recordset21 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CursorLocation )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out CursorLocationEnum *plCursorLoc); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CursorLocation )( __RPC__in Recordset21 * This, /* [in] */ CursorLocationEnum lCursorLoc); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *NextADORecordset )( __RPC__in Recordset21 * This, /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppiRs); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Supports )( __RPC__in Recordset21 * This, /* [in] */ CursorOptionEnum CursorOptions, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Collect )( __RPC__in Recordset21 * This, /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Collect )( __RPC__in Recordset21 * This, /* [in] */ VARIANT Index, /* [in] */ VARIANT value); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_MarshalOptions )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out MarshalOptionsEnum *peMarshal); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_MarshalOptions )( __RPC__in Recordset21 * This, /* [in] */ MarshalOptionsEnum eMarshal); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Find )( __RPC__in Recordset21 * This, /* [in] */ __RPC__in BSTR Criteria, /* [defaultvalue][in] */ long SkipRecords, /* [defaultvalue][in] */ SearchDirectionEnum SearchDirection, /* [optional][in] */ VARIANT Start); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Cancel )( __RPC__in Recordset21 * This); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DataSource )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppunkDataSource); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_DataSource )( __RPC__in Recordset21 * This, /* [in] */ __RPC__in_opt IUnknown *punkDataSource); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xSave )( __RPC__in Recordset21 * This, /* [defaultvalue][in] */ __RPC__in BSTR FileName, /* [defaultvalue][in] */ PersistFormatEnum PersistFormat); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveCommand )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__deref_out_opt IDispatch **ppCmd); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_StayInSync )( __RPC__in Recordset21 * This, /* [in] */ VARIANT_BOOL bStayInSync); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_StayInSync )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pbStayInSync); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetString )( __RPC__in Recordset21 * This, /* [defaultvalue][in] */ StringFormatEnum StringFormat, /* [defaultvalue][in] */ long NumRows, /* [defaultvalue][in] */ __RPC__in BSTR ColumnDelimeter, /* [defaultvalue][in] */ __RPC__in BSTR RowDelimeter, /* [defaultvalue][in] */ __RPC__in BSTR NullExpr, /* [retval][out] */ __RPC__deref_out_opt BSTR *pRetString); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DataMember )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrDataMember); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_DataMember )( __RPC__in Recordset21 * This, /* [in] */ __RPC__in BSTR bstrDataMember); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CompareBookmarks )( __RPC__in Recordset21 * This, /* [in] */ VARIANT Bookmark1, /* [in] */ VARIANT Bookmark2, /* [retval][out] */ __RPC__out CompareEnum *pCompare); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( __RPC__in Recordset21 * This, /* [defaultvalue][in] */ LockTypeEnum LockType, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppvObject); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Resync )( __RPC__in Recordset21 * This, /* [defaultvalue][in] */ AffectEnum AffectRecords, /* [defaultvalue][in] */ ResyncEnum ResyncValues); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Seek )( __RPC__in Recordset21 * This, /* [in] */ VARIANT KeyValues, /* [defaultvalue][in] */ SeekEnum SeekOption); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Index )( __RPC__in Recordset21 * This, /* [in] */ __RPC__in BSTR Index); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Index )( __RPC__in Recordset21 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrIndex); END_INTERFACE } Recordset21Vtbl; interface Recordset21 { CONST_VTBL struct Recordset21Vtbl *lpVtbl; }; #ifdef COBJMACROS #define Recordset21_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Recordset21_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Recordset21_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Recordset21_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Recordset21_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Recordset21_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Recordset21_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Recordset21_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define Recordset21_get_AbsolutePosition(This,pl) \ ( (This)->lpVtbl -> get_AbsolutePosition(This,pl) ) #define Recordset21_put_AbsolutePosition(This,Position) \ ( (This)->lpVtbl -> put_AbsolutePosition(This,Position) ) #define Recordset21_putref_ActiveConnection(This,pconn) \ ( (This)->lpVtbl -> putref_ActiveConnection(This,pconn) ) #define Recordset21_put_ActiveConnection(This,vConn) \ ( (This)->lpVtbl -> put_ActiveConnection(This,vConn) ) #define Recordset21_get_ActiveConnection(This,pvar) \ ( (This)->lpVtbl -> get_ActiveConnection(This,pvar) ) #define Recordset21_get_BOF(This,pb) \ ( (This)->lpVtbl -> get_BOF(This,pb) ) #define Recordset21_get_Bookmark(This,pvBookmark) \ ( (This)->lpVtbl -> get_Bookmark(This,pvBookmark) ) #define Recordset21_put_Bookmark(This,vBookmark) \ ( (This)->lpVtbl -> put_Bookmark(This,vBookmark) ) #define Recordset21_get_CacheSize(This,pl) \ ( (This)->lpVtbl -> get_CacheSize(This,pl) ) #define Recordset21_put_CacheSize(This,CacheSize) \ ( (This)->lpVtbl -> put_CacheSize(This,CacheSize) ) #define Recordset21_get_CursorType(This,plCursorType) \ ( (This)->lpVtbl -> get_CursorType(This,plCursorType) ) #define Recordset21_put_CursorType(This,lCursorType) \ ( (This)->lpVtbl -> put_CursorType(This,lCursorType) ) #define Recordset21_get_EOF(This,pb) \ ( (This)->lpVtbl -> get_EOF(This,pb) ) #define Recordset21_get_Fields(This,ppvObject) \ ( (This)->lpVtbl -> get_Fields(This,ppvObject) ) #define Recordset21_get_LockType(This,plLockType) \ ( (This)->lpVtbl -> get_LockType(This,plLockType) ) #define Recordset21_put_LockType(This,lLockType) \ ( (This)->lpVtbl -> put_LockType(This,lLockType) ) #define Recordset21_get_MaxRecords(This,plMaxRecords) \ ( (This)->lpVtbl -> get_MaxRecords(This,plMaxRecords) ) #define Recordset21_put_MaxRecords(This,lMaxRecords) \ ( (This)->lpVtbl -> put_MaxRecords(This,lMaxRecords) ) #define Recordset21_get_RecordCount(This,pl) \ ( (This)->lpVtbl -> get_RecordCount(This,pl) ) #define Recordset21_putref_Source(This,pcmd) \ ( (This)->lpVtbl -> putref_Source(This,pcmd) ) #define Recordset21_put_Source(This,bstrConn) \ ( (This)->lpVtbl -> put_Source(This,bstrConn) ) #define Recordset21_get_Source(This,pvSource) \ ( (This)->lpVtbl -> get_Source(This,pvSource) ) #define Recordset21_AddNew(This,FieldList,Values) \ ( (This)->lpVtbl -> AddNew(This,FieldList,Values) ) #define Recordset21_CancelUpdate(This) \ ( (This)->lpVtbl -> CancelUpdate(This) ) #define Recordset21_Close(This) \ ( (This)->lpVtbl -> Close(This) ) #define Recordset21_Delete(This,AffectRecords) \ ( (This)->lpVtbl -> Delete(This,AffectRecords) ) #define Recordset21_GetRows(This,Rows,Start,Fields,pvar) \ ( (This)->lpVtbl -> GetRows(This,Rows,Start,Fields,pvar) ) #define Recordset21_Move(This,NumRecords,Start) \ ( (This)->lpVtbl -> Move(This,NumRecords,Start) ) #define Recordset21_MoveNext(This) \ ( (This)->lpVtbl -> MoveNext(This) ) #define Recordset21_MovePrevious(This) \ ( (This)->lpVtbl -> MovePrevious(This) ) #define Recordset21_MoveFirst(This) \ ( (This)->lpVtbl -> MoveFirst(This) ) #define Recordset21_MoveLast(This) \ ( (This)->lpVtbl -> MoveLast(This) ) #define Recordset21_Open(This,Source,ActiveConnection,CursorType,LockType,Options) \ ( (This)->lpVtbl -> Open(This,Source,ActiveConnection,CursorType,LockType,Options) ) #define Recordset21_Requery(This,Options) \ ( (This)->lpVtbl -> Requery(This,Options) ) #define Recordset21__xResync(This,AffectRecords) \ ( (This)->lpVtbl -> _xResync(This,AffectRecords) ) #define Recordset21_Update(This,Fields,Values) \ ( (This)->lpVtbl -> Update(This,Fields,Values) ) #define Recordset21_get_AbsolutePage(This,pl) \ ( (This)->lpVtbl -> get_AbsolutePage(This,pl) ) #define Recordset21_put_AbsolutePage(This,Page) \ ( (This)->lpVtbl -> put_AbsolutePage(This,Page) ) #define Recordset21_get_EditMode(This,pl) \ ( (This)->lpVtbl -> get_EditMode(This,pl) ) #define Recordset21_get_Filter(This,Criteria) \ ( (This)->lpVtbl -> get_Filter(This,Criteria) ) #define Recordset21_put_Filter(This,Criteria) \ ( (This)->lpVtbl -> put_Filter(This,Criteria) ) #define Recordset21_get_PageCount(This,pl) \ ( (This)->lpVtbl -> get_PageCount(This,pl) ) #define Recordset21_get_PageSize(This,pl) \ ( (This)->lpVtbl -> get_PageSize(This,pl) ) #define Recordset21_put_PageSize(This,PageSize) \ ( (This)->lpVtbl -> put_PageSize(This,PageSize) ) #define Recordset21_get_Sort(This,Criteria) \ ( (This)->lpVtbl -> get_Sort(This,Criteria) ) #define Recordset21_put_Sort(This,Criteria) \ ( (This)->lpVtbl -> put_Sort(This,Criteria) ) #define Recordset21_get_Status(This,pl) \ ( (This)->lpVtbl -> get_Status(This,pl) ) #define Recordset21_get_State(This,plObjState) \ ( (This)->lpVtbl -> get_State(This,plObjState) ) #define Recordset21__xClone(This,ppvObject) \ ( (This)->lpVtbl -> _xClone(This,ppvObject) ) #define Recordset21_UpdateBatch(This,AffectRecords) \ ( (This)->lpVtbl -> UpdateBatch(This,AffectRecords) ) #define Recordset21_CancelBatch(This,AffectRecords) \ ( (This)->lpVtbl -> CancelBatch(This,AffectRecords) ) #define Recordset21_get_CursorLocation(This,plCursorLoc) \ ( (This)->lpVtbl -> get_CursorLocation(This,plCursorLoc) ) #define Recordset21_put_CursorLocation(This,lCursorLoc) \ ( (This)->lpVtbl -> put_CursorLocation(This,lCursorLoc) ) #define Recordset21_NextRecordset(This,RecordsAffected,ppiRs) \ ( (This)->lpVtbl -> NextRecordset(This,RecordsAffected,ppiRs) ) #define Recordset21_Supports(This,CursorOptions,pb) \ ( (This)->lpVtbl -> Supports(This,CursorOptions,pb) ) #define Recordset21_get_Collect(This,Index,pvar) \ ( (This)->lpVtbl -> get_Collect(This,Index,pvar) ) #define Recordset21_put_Collect(This,Index,value) \ ( (This)->lpVtbl -> put_Collect(This,Index,value) ) #define Recordset21_get_MarshalOptions(This,peMarshal) \ ( (This)->lpVtbl -> get_MarshalOptions(This,peMarshal) ) #define Recordset21_put_MarshalOptions(This,eMarshal) \ ( (This)->lpVtbl -> put_MarshalOptions(This,eMarshal) ) #define Recordset21_Find(This,Criteria,SkipRecords,SearchDirection,Start) \ ( (This)->lpVtbl -> Find(This,Criteria,SkipRecords,SearchDirection,Start) ) #define Recordset21_Cancel(This) \ ( (This)->lpVtbl -> Cancel(This) ) #define Recordset21_get_DataSource(This,ppunkDataSource) \ ( (This)->lpVtbl -> get_DataSource(This,ppunkDataSource) ) #define Recordset21_putref_DataSource(This,punkDataSource) \ ( (This)->lpVtbl -> putref_DataSource(This,punkDataSource) ) #define Recordset21__xSave(This,FileName,PersistFormat) \ ( (This)->lpVtbl -> _xSave(This,FileName,PersistFormat) ) #define Recordset21_get_ActiveCommand(This,ppCmd) \ ( (This)->lpVtbl -> get_ActiveCommand(This,ppCmd) ) #define Recordset21_put_StayInSync(This,bStayInSync) \ ( (This)->lpVtbl -> put_StayInSync(This,bStayInSync) ) #define Recordset21_get_StayInSync(This,pbStayInSync) \ ( (This)->lpVtbl -> get_StayInSync(This,pbStayInSync) ) #define Recordset21_GetString(This,StringFormat,NumRows,ColumnDelimeter,RowDelimeter,NullExpr,pRetString) \ ( (This)->lpVtbl -> GetString(This,StringFormat,NumRows,ColumnDelimeter,RowDelimeter,NullExpr,pRetString) ) #define Recordset21_get_DataMember(This,pbstrDataMember) \ ( (This)->lpVtbl -> get_DataMember(This,pbstrDataMember) ) #define Recordset21_put_DataMember(This,bstrDataMember) \ ( (This)->lpVtbl -> put_DataMember(This,bstrDataMember) ) #define Recordset21_CompareBookmarks(This,Bookmark1,Bookmark2,pCompare) \ ( (This)->lpVtbl -> CompareBookmarks(This,Bookmark1,Bookmark2,pCompare) ) #define Recordset21_Clone(This,LockType,ppvObject) \ ( (This)->lpVtbl -> Clone(This,LockType,ppvObject) ) #define Recordset21_Resync(This,AffectRecords,ResyncValues) \ ( (This)->lpVtbl -> Resync(This,AffectRecords,ResyncValues) ) #define Recordset21_Seek(This,KeyValues,SeekOption) \ ( (This)->lpVtbl -> Seek(This,KeyValues,SeekOption) ) #define Recordset21_put_Index(This,Index) \ ( (This)->lpVtbl -> put_Index(This,Index) ) #define Recordset21_get_Index(This,pbstrIndex) \ ( (This)->lpVtbl -> get_Index(This,pbstrIndex) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Recordset21_INTERFACE_DEFINED__ */ #ifndef ___Recordset_INTERFACE_DEFINED__ #define ___Recordset_INTERFACE_DEFINED__ /* interface _ADORecordset */ /* [object][helpcontext][uuid][nonextensible][hidden][dual] */ EXTERN_C const IID IID__Recordset; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001556-0000-0010-8000-00AA006D2EA4") _ADORecordset : public Recordset21 { public: virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Save( /* [optional][in] */ VARIANT Destination, /* [defaultvalue][in] */ PersistFormatEnum PersistFormat = adPersistADTG) = 0; }; #else /* C style interface */ typedef struct _RecordsetVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in _ADORecordset * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in _ADORecordset * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in _ADORecordset * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in _ADORecordset * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in _ADORecordset * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in _ADORecordset * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( _ADORecordset * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AbsolutePosition )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out PositionEnum *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AbsolutePosition )( __RPC__in _ADORecordset * This, /* [in] */ PositionEnum Position); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_ActiveADOConnection )( __RPC__in _ADORecordset * This, /* [in] */ __RPC__in_opt IDispatch *pconn); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ActiveConnection )( __RPC__in _ADORecordset * This, /* [in] */ VARIANT vConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveConnection )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_BOF )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Bookmark )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out VARIANT *pvBookmark); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Bookmark )( __RPC__in _ADORecordset * This, /* [in] */ VARIANT vBookmark); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CacheSize )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CacheSize )( __RPC__in _ADORecordset * This, /* [in] */ long CacheSize); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CursorType )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out CursorTypeEnum *plCursorType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CursorType )( __RPC__in _ADORecordset * This, /* [in] */ CursorTypeEnum lCursorType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_EOF )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Fields )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__deref_out_opt ADOFields **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_LockType )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out LockTypeEnum *plLockType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_LockType )( __RPC__in _ADORecordset * This, /* [in] */ LockTypeEnum lLockType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_MaxRecords )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out long *plMaxRecords); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_MaxRecords )( __RPC__in _ADORecordset * This, /* [in] */ long lMaxRecords); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_RecordCount )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_Source )( __RPC__in _ADORecordset * This, /* [in] */ __RPC__in_opt IDispatch *pcmd); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Source )( __RPC__in _ADORecordset * This, /* [in] */ __RPC__in BSTR bstrConn); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out VARIANT *pvSource); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *AddNew )( __RPC__in _ADORecordset * This, /* [optional][in] */ VARIANT FieldList, /* [optional][in] */ VARIANT Values); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CancelUpdate )( __RPC__in _ADORecordset * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Close )( __RPC__in _ADORecordset * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Delete )( __RPC__in _ADORecordset * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetRows )( __RPC__in _ADORecordset * This, /* [defaultvalue][in] */ long Rows, /* [optional][in] */ VARIANT Start, /* [optional][in] */ VARIANT Fields, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Move )( __RPC__in _ADORecordset * This, /* [in] */ long NumRecords, /* [optional][in] */ VARIANT Start); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveNext )( __RPC__in _ADORecordset * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MovePrevious )( __RPC__in _ADORecordset * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveFirst )( __RPC__in _ADORecordset * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *MoveLast )( __RPC__in _ADORecordset * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Open )( __RPC__in _ADORecordset * This, /* [optional][in] */ VARIANT Source, /* [optional][in] */ VARIANT ActiveConnection, /* [defaultvalue][in] */ CursorTypeEnum CursorType, /* [defaultvalue][in] */ LockTypeEnum LockType, /* [defaultvalue][in] */ LONG Options); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Requery )( __RPC__in _ADORecordset * This, /* [defaultvalue][in] */ LONG Options); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xResync )( __RPC__in _ADORecordset * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Update )( __RPC__in _ADORecordset * This, /* [optional][in] */ VARIANT Fields, /* [optional][in] */ VARIANT Values); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AbsolutePage )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out PositionEnum *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AbsolutePage )( __RPC__in _ADORecordset * This, /* [in] */ PositionEnum Page); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_EditMode )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out EditModeEnum *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Filter )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out VARIANT *Criteria); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Filter )( __RPC__in _ADORecordset * This, /* [in] */ VARIANT Criteria); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_PageCount )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_PageSize )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_PageSize )( __RPC__in _ADORecordset * This, /* [in] */ long PageSize); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Sort )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *Criteria); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Sort )( __RPC__in _ADORecordset * This, /* [in] */ __RPC__in BSTR Criteria); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_State )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out LONG *plObjState); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xClone )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppvObject); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *UpdateBatch )( __RPC__in _ADORecordset * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CancelBatch )( __RPC__in _ADORecordset * This, /* [defaultvalue][in] */ AffectEnum AffectRecords); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_CursorLocation )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out CursorLocationEnum *plCursorLoc); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_CursorLocation )( __RPC__in _ADORecordset * This, /* [in] */ CursorLocationEnum lCursorLoc); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *NextADORecordset )( __RPC__in _ADORecordset * This, /* [optional][out] */ __RPC__out VARIANT *RecordsAffected, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppiRs); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Supports )( __RPC__in _ADORecordset * This, /* [in] */ CursorOptionEnum CursorOptions, /* [retval][out] */ __RPC__out VARIANT_BOOL *pb); /* [hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Collect )( __RPC__in _ADORecordset * This, /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Collect )( __RPC__in _ADORecordset * This, /* [in] */ VARIANT Index, /* [in] */ VARIANT value); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_MarshalOptions )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out MarshalOptionsEnum *peMarshal); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_MarshalOptions )( __RPC__in _ADORecordset * This, /* [in] */ MarshalOptionsEnum eMarshal); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Find )( __RPC__in _ADORecordset * This, /* [in] */ __RPC__in BSTR Criteria, /* [defaultvalue][in] */ long SkipRecords, /* [defaultvalue][in] */ SearchDirectionEnum SearchDirection, /* [optional][in] */ VARIANT Start); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Cancel )( __RPC__in _ADORecordset * This); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DataSource )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppunkDataSource); /* [helpcontext][propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_DataSource )( __RPC__in _ADORecordset * This, /* [in] */ __RPC__in_opt IUnknown *punkDataSource); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_xSave )( __RPC__in _ADORecordset * This, /* [defaultvalue][in] */ __RPC__in BSTR FileName, /* [defaultvalue][in] */ PersistFormatEnum PersistFormat); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveCommand )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__deref_out_opt IDispatch **ppCmd); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_StayInSync )( __RPC__in _ADORecordset * This, /* [in] */ VARIANT_BOOL bStayInSync); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_StayInSync )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__out VARIANT_BOOL *pbStayInSync); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetString )( __RPC__in _ADORecordset * This, /* [defaultvalue][in] */ StringFormatEnum StringFormat, /* [defaultvalue][in] */ long NumRows, /* [defaultvalue][in] */ __RPC__in BSTR ColumnDelimeter, /* [defaultvalue][in] */ __RPC__in BSTR RowDelimeter, /* [defaultvalue][in] */ __RPC__in BSTR NullExpr, /* [retval][out] */ __RPC__deref_out_opt BSTR *pRetString); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DataMember )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrDataMember); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_DataMember )( __RPC__in _ADORecordset * This, /* [in] */ __RPC__in BSTR bstrDataMember); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CompareBookmarks )( __RPC__in _ADORecordset * This, /* [in] */ VARIANT Bookmark1, /* [in] */ VARIANT Bookmark2, /* [retval][out] */ __RPC__out CompareEnum *pCompare); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( __RPC__in _ADORecordset * This, /* [defaultvalue][in] */ LockTypeEnum LockType, /* [retval][out] */ __RPC__deref_out_opt _ADORecordset **ppvObject); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Resync )( __RPC__in _ADORecordset * This, /* [defaultvalue][in] */ AffectEnum AffectRecords, /* [defaultvalue][in] */ ResyncEnum ResyncValues); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Seek )( __RPC__in _ADORecordset * This, /* [in] */ VARIANT KeyValues, /* [defaultvalue][in] */ SeekEnum SeekOption); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Index )( __RPC__in _ADORecordset * This, /* [in] */ __RPC__in BSTR Index); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Index )( __RPC__in _ADORecordset * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstrIndex); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Save )( __RPC__in _ADORecordset * This, /* [optional][in] */ VARIANT Destination, /* [defaultvalue][in] */ PersistFormatEnum PersistFormat); END_INTERFACE } _RecordsetVtbl; interface _Recordset { CONST_VTBL struct _RecordsetVtbl *lpVtbl; }; #ifdef COBJMACROS #define _Recordset_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _Recordset_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define _Recordset_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define _Recordset_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _Recordset_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _Recordset_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _Recordset_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _Recordset_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define _Recordset_get_AbsolutePosition(This,pl) \ ( (This)->lpVtbl -> get_AbsolutePosition(This,pl) ) #define _Recordset_put_AbsolutePosition(This,Position) \ ( (This)->lpVtbl -> put_AbsolutePosition(This,Position) ) #define _Recordset_putref_ActiveConnection(This,pconn) \ ( (This)->lpVtbl -> putref_ActiveConnection(This,pconn) ) #define _Recordset_put_ActiveConnection(This,vConn) \ ( (This)->lpVtbl -> put_ActiveConnection(This,vConn) ) #define _Recordset_get_ActiveConnection(This,pvar) \ ( (This)->lpVtbl -> get_ActiveConnection(This,pvar) ) #define _Recordset_get_BOF(This,pb) \ ( (This)->lpVtbl -> get_BOF(This,pb) ) #define _Recordset_get_Bookmark(This,pvBookmark) \ ( (This)->lpVtbl -> get_Bookmark(This,pvBookmark) ) #define _Recordset_put_Bookmark(This,vBookmark) \ ( (This)->lpVtbl -> put_Bookmark(This,vBookmark) ) #define _Recordset_get_CacheSize(This,pl) \ ( (This)->lpVtbl -> get_CacheSize(This,pl) ) #define _Recordset_put_CacheSize(This,CacheSize) \ ( (This)->lpVtbl -> put_CacheSize(This,CacheSize) ) #define _Recordset_get_CursorType(This,plCursorType) \ ( (This)->lpVtbl -> get_CursorType(This,plCursorType) ) #define _Recordset_put_CursorType(This,lCursorType) \ ( (This)->lpVtbl -> put_CursorType(This,lCursorType) ) #define _Recordset_get_EOF(This,pb) \ ( (This)->lpVtbl -> get_EOF(This,pb) ) #define _Recordset_get_Fields(This,ppvObject) \ ( (This)->lpVtbl -> get_Fields(This,ppvObject) ) #define _Recordset_get_LockType(This,plLockType) \ ( (This)->lpVtbl -> get_LockType(This,plLockType) ) #define _Recordset_put_LockType(This,lLockType) \ ( (This)->lpVtbl -> put_LockType(This,lLockType) ) #define _Recordset_get_MaxRecords(This,plMaxRecords) \ ( (This)->lpVtbl -> get_MaxRecords(This,plMaxRecords) ) #define _Recordset_put_MaxRecords(This,lMaxRecords) \ ( (This)->lpVtbl -> put_MaxRecords(This,lMaxRecords) ) #define _Recordset_get_RecordCount(This,pl) \ ( (This)->lpVtbl -> get_RecordCount(This,pl) ) #define _Recordset_putref_Source(This,pcmd) \ ( (This)->lpVtbl -> putref_Source(This,pcmd) ) #define _Recordset_put_Source(This,bstrConn) \ ( (This)->lpVtbl -> put_Source(This,bstrConn) ) #define _Recordset_get_Source(This,pvSource) \ ( (This)->lpVtbl -> get_Source(This,pvSource) ) #define _Recordset_AddNew(This,FieldList,Values) \ ( (This)->lpVtbl -> AddNew(This,FieldList,Values) ) #define _Recordset_CancelUpdate(This) \ ( (This)->lpVtbl -> CancelUpdate(This) ) #define _Recordset_Close(This) \ ( (This)->lpVtbl -> Close(This) ) #define _Recordset_Delete(This,AffectRecords) \ ( (This)->lpVtbl -> Delete(This,AffectRecords) ) #define _Recordset_GetRows(This,Rows,Start,Fields,pvar) \ ( (This)->lpVtbl -> GetRows(This,Rows,Start,Fields,pvar) ) #define _Recordset_Move(This,NumRecords,Start) \ ( (This)->lpVtbl -> Move(This,NumRecords,Start) ) #define _Recordset_MoveNext(This) \ ( (This)->lpVtbl -> MoveNext(This) ) #define _Recordset_MovePrevious(This) \ ( (This)->lpVtbl -> MovePrevious(This) ) #define _Recordset_MoveFirst(This) \ ( (This)->lpVtbl -> MoveFirst(This) ) #define _Recordset_MoveLast(This) \ ( (This)->lpVtbl -> MoveLast(This) ) #define _Recordset_Open(This,Source,ActiveConnection,CursorType,LockType,Options) \ ( (This)->lpVtbl -> Open(This,Source,ActiveConnection,CursorType,LockType,Options) ) #define _Recordset_Requery(This,Options) \ ( (This)->lpVtbl -> Requery(This,Options) ) #define _Recordset__xResync(This,AffectRecords) \ ( (This)->lpVtbl -> _xResync(This,AffectRecords) ) #define _Recordset_Update(This,Fields,Values) \ ( (This)->lpVtbl -> Update(This,Fields,Values) ) #define _Recordset_get_AbsolutePage(This,pl) \ ( (This)->lpVtbl -> get_AbsolutePage(This,pl) ) #define _Recordset_put_AbsolutePage(This,Page) \ ( (This)->lpVtbl -> put_AbsolutePage(This,Page) ) #define _Recordset_get_EditMode(This,pl) \ ( (This)->lpVtbl -> get_EditMode(This,pl) ) #define _Recordset_get_Filter(This,Criteria) \ ( (This)->lpVtbl -> get_Filter(This,Criteria) ) #define _Recordset_put_Filter(This,Criteria) \ ( (This)->lpVtbl -> put_Filter(This,Criteria) ) #define _Recordset_get_PageCount(This,pl) \ ( (This)->lpVtbl -> get_PageCount(This,pl) ) #define _Recordset_get_PageSize(This,pl) \ ( (This)->lpVtbl -> get_PageSize(This,pl) ) #define _Recordset_put_PageSize(This,PageSize) \ ( (This)->lpVtbl -> put_PageSize(This,PageSize) ) #define _Recordset_get_Sort(This,Criteria) \ ( (This)->lpVtbl -> get_Sort(This,Criteria) ) #define _Recordset_put_Sort(This,Criteria) \ ( (This)->lpVtbl -> put_Sort(This,Criteria) ) #define _Recordset_get_Status(This,pl) \ ( (This)->lpVtbl -> get_Status(This,pl) ) #define _Recordset_get_State(This,plObjState) \ ( (This)->lpVtbl -> get_State(This,plObjState) ) #define _Recordset__xClone(This,ppvObject) \ ( (This)->lpVtbl -> _xClone(This,ppvObject) ) #define _Recordset_UpdateBatch(This,AffectRecords) \ ( (This)->lpVtbl -> UpdateBatch(This,AffectRecords) ) #define _Recordset_CancelBatch(This,AffectRecords) \ ( (This)->lpVtbl -> CancelBatch(This,AffectRecords) ) #define _Recordset_get_CursorLocation(This,plCursorLoc) \ ( (This)->lpVtbl -> get_CursorLocation(This,plCursorLoc) ) #define _Recordset_put_CursorLocation(This,lCursorLoc) \ ( (This)->lpVtbl -> put_CursorLocation(This,lCursorLoc) ) #define _Recordset_NextRecordset(This,RecordsAffected,ppiRs) \ ( (This)->lpVtbl -> NextRecordset(This,RecordsAffected,ppiRs) ) #define _Recordset_Supports(This,CursorOptions,pb) \ ( (This)->lpVtbl -> Supports(This,CursorOptions,pb) ) #define _Recordset_get_Collect(This,Index,pvar) \ ( (This)->lpVtbl -> get_Collect(This,Index,pvar) ) #define _Recordset_put_Collect(This,Index,value) \ ( (This)->lpVtbl -> put_Collect(This,Index,value) ) #define _Recordset_get_MarshalOptions(This,peMarshal) \ ( (This)->lpVtbl -> get_MarshalOptions(This,peMarshal) ) #define _Recordset_put_MarshalOptions(This,eMarshal) \ ( (This)->lpVtbl -> put_MarshalOptions(This,eMarshal) ) #define _Recordset_Find(This,Criteria,SkipRecords,SearchDirection,Start) \ ( (This)->lpVtbl -> Find(This,Criteria,SkipRecords,SearchDirection,Start) ) #define _Recordset_Cancel(This) \ ( (This)->lpVtbl -> Cancel(This) ) #define _Recordset_get_DataSource(This,ppunkDataSource) \ ( (This)->lpVtbl -> get_DataSource(This,ppunkDataSource) ) #define _Recordset_putref_DataSource(This,punkDataSource) \ ( (This)->lpVtbl -> putref_DataSource(This,punkDataSource) ) #define _Recordset__xSave(This,FileName,PersistFormat) \ ( (This)->lpVtbl -> _xSave(This,FileName,PersistFormat) ) #define _Recordset_get_ActiveCommand(This,ppCmd) \ ( (This)->lpVtbl -> get_ActiveCommand(This,ppCmd) ) #define _Recordset_put_StayInSync(This,bStayInSync) \ ( (This)->lpVtbl -> put_StayInSync(This,bStayInSync) ) #define _Recordset_get_StayInSync(This,pbStayInSync) \ ( (This)->lpVtbl -> get_StayInSync(This,pbStayInSync) ) #define _Recordset_GetString(This,StringFormat,NumRows,ColumnDelimeter,RowDelimeter,NullExpr,pRetString) \ ( (This)->lpVtbl -> GetString(This,StringFormat,NumRows,ColumnDelimeter,RowDelimeter,NullExpr,pRetString) ) #define _Recordset_get_DataMember(This,pbstrDataMember) \ ( (This)->lpVtbl -> get_DataMember(This,pbstrDataMember) ) #define _Recordset_put_DataMember(This,bstrDataMember) \ ( (This)->lpVtbl -> put_DataMember(This,bstrDataMember) ) #define _Recordset_CompareBookmarks(This,Bookmark1,Bookmark2,pCompare) \ ( (This)->lpVtbl -> CompareBookmarks(This,Bookmark1,Bookmark2,pCompare) ) #define _Recordset_Clone(This,LockType,ppvObject) \ ( (This)->lpVtbl -> Clone(This,LockType,ppvObject) ) #define _Recordset_Resync(This,AffectRecords,ResyncValues) \ ( (This)->lpVtbl -> Resync(This,AffectRecords,ResyncValues) ) #define _Recordset_Seek(This,KeyValues,SeekOption) \ ( (This)->lpVtbl -> Seek(This,KeyValues,SeekOption) ) #define _Recordset_put_Index(This,Index) \ ( (This)->lpVtbl -> put_Index(This,Index) ) #define _Recordset_get_Index(This,pbstrIndex) \ ( (This)->lpVtbl -> get_Index(This,pbstrIndex) ) #define _Recordset_Save(This,Destination,PersistFormat) \ ( (This)->lpVtbl -> Save(This,Destination,PersistFormat) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* ___Recordset_INTERFACE_DEFINED__ */ #ifndef __ADORecordsetConstruction_INTERFACE_DEFINED__ #define __ADORecordsetConstruction_INTERFACE_DEFINED__ /* interface ADORecordsetConstruction */ /* [object][uuid][hidden][restricted] */ EXTERN_C const IID IID_ADORecordsetConstruction; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000283-0000-0010-8000-00AA006D2EA4") ADORecordsetConstruction : public IDispatch { public: virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Rowset( /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppRowset) = 0; virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Rowset( /* [in] */ __RPC__in_opt IUnknown *pRowset) = 0; virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Chapter( /* [retval][out] */ __RPC__out ADO_LONGPTR *plChapter) = 0; virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Chapter( /* [in] */ ADO_LONGPTR lChapter) = 0; virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_RowPosition( /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppRowPos) = 0; virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_RowPosition( /* [in] */ __RPC__in_opt IUnknown *pRowPos) = 0; }; #else /* C style interface */ typedef struct ADORecordsetConstructionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADORecordsetConstruction * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADORecordsetConstruction * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADORecordsetConstruction * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ADORecordsetConstruction * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ADORecordsetConstruction * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ADORecordsetConstruction * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ADORecordsetConstruction * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Rowset )( __RPC__in ADORecordsetConstruction * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppRowset); /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Rowset )( __RPC__in ADORecordsetConstruction * This, /* [in] */ __RPC__in_opt IUnknown *pRowset); /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Chapter )( __RPC__in ADORecordsetConstruction * This, /* [retval][out] */ __RPC__out ADO_LONGPTR *plChapter); /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Chapter )( __RPC__in ADORecordsetConstruction * This, /* [in] */ ADO_LONGPTR lChapter); /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RowPosition )( __RPC__in ADORecordsetConstruction * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppRowPos); /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_RowPosition )( __RPC__in ADORecordsetConstruction * This, /* [in] */ __RPC__in_opt IUnknown *pRowPos); END_INTERFACE } ADORecordsetConstructionVtbl; interface ADORecordsetConstruction { CONST_VTBL struct ADORecordsetConstructionVtbl *lpVtbl; }; #ifdef COBJMACROS #define ADORecordsetConstruction_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ADORecordsetConstruction_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define ADORecordsetConstruction_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define ADORecordsetConstruction_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define ADORecordsetConstruction_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define ADORecordsetConstruction_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define ADORecordsetConstruction_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define ADORecordsetConstruction_get_Rowset(This,ppRowset) \ ( (This)->lpVtbl -> get_Rowset(This,ppRowset) ) #define ADORecordsetConstruction_put_Rowset(This,pRowset) \ ( (This)->lpVtbl -> put_Rowset(This,pRowset) ) #define ADORecordsetConstruction_get_Chapter(This,plChapter) \ ( (This)->lpVtbl -> get_Chapter(This,plChapter) ) #define ADORecordsetConstruction_put_Chapter(This,lChapter) \ ( (This)->lpVtbl -> put_Chapter(This,lChapter) ) #define ADORecordsetConstruction_get_RowPosition(This,ppRowPos) \ ( (This)->lpVtbl -> get_RowPosition(This,ppRowPos) ) #define ADORecordsetConstruction_put_RowPosition(This,pRowPos) \ ( (This)->lpVtbl -> put_RowPosition(This,pRowPos) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __ADORecordsetConstruction_INTERFACE_DEFINED__ */ #ifndef __Field15_INTERFACE_DEFINED__ #define __Field15_INTERFACE_DEFINED__ /* interface Field15 */ /* [object][helpcontext][uuid][hidden][nonextensible][dual] */ EXTERN_C const IID IID_Field15; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001505-0000-0010-8000-00AA006D2EA4") Field15 : public _ADO { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_ActualSize( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Attributes( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_DefinedSize( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Name( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Type( /* [retval][out] */ __RPC__out DataTypeEnum *pDataType) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Value( /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Value( /* [in] */ VARIANT Val) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Precision( /* [retval][out] */ __RPC__out BYTE *pbPrecision) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_NumericScale( /* [retval][out] */ __RPC__out BYTE *pbNumericScale) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE AppendChunk( /* [in] */ VARIANT Data) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE GetChunk( /* [in] */ long Length, /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_OriginalValue( /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_UnderlyingValue( /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; }; #else /* C style interface */ typedef struct Field15Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in Field15 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in Field15 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in Field15 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in Field15 * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in Field15 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in Field15 * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( Field15 * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActualSize )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Attributes )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DefinedSize )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__out DataTypeEnum *pDataType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Value )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Value )( __RPC__in Field15 * This, /* [in] */ VARIANT Val); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Precision )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__out BYTE *pbPrecision); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_NumericScale )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__out BYTE *pbNumericScale); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *AppendChunk )( __RPC__in Field15 * This, /* [in] */ VARIANT Data); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetChunk )( __RPC__in Field15 * This, /* [in] */ long Length, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_OriginalValue )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_UnderlyingValue )( __RPC__in Field15 * This, /* [retval][out] */ __RPC__out VARIANT *pvar); END_INTERFACE } Field15Vtbl; interface Field15 { CONST_VTBL struct Field15Vtbl *lpVtbl; }; #ifdef COBJMACROS #define Field15_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Field15_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Field15_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Field15_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Field15_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Field15_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Field15_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Field15_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define Field15_get_ActualSize(This,pl) \ ( (This)->lpVtbl -> get_ActualSize(This,pl) ) #define Field15_get_Attributes(This,pl) \ ( (This)->lpVtbl -> get_Attributes(This,pl) ) #define Field15_get_DefinedSize(This,pl) \ ( (This)->lpVtbl -> get_DefinedSize(This,pl) ) #define Field15_get_Name(This,pbstr) \ ( (This)->lpVtbl -> get_Name(This,pbstr) ) #define Field15_get_Type(This,pDataType) \ ( (This)->lpVtbl -> get_Type(This,pDataType) ) #define Field15_get_Value(This,pvar) \ ( (This)->lpVtbl -> get_Value(This,pvar) ) #define Field15_put_Value(This,Val) \ ( (This)->lpVtbl -> put_Value(This,Val) ) #define Field15_get_Precision(This,pbPrecision) \ ( (This)->lpVtbl -> get_Precision(This,pbPrecision) ) #define Field15_get_NumericScale(This,pbNumericScale) \ ( (This)->lpVtbl -> get_NumericScale(This,pbNumericScale) ) #define Field15_AppendChunk(This,Data) \ ( (This)->lpVtbl -> AppendChunk(This,Data) ) #define Field15_GetChunk(This,Length,pvar) \ ( (This)->lpVtbl -> GetChunk(This,Length,pvar) ) #define Field15_get_OriginalValue(This,pvar) \ ( (This)->lpVtbl -> get_OriginalValue(This,pvar) ) #define Field15_get_UnderlyingValue(This,pvar) \ ( (This)->lpVtbl -> get_UnderlyingValue(This,pvar) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Field15_INTERFACE_DEFINED__ */ #ifndef __Field20_INTERFACE_DEFINED__ #define __Field20_INTERFACE_DEFINED__ /* interface Field20 */ /* [object][helpcontext][uuid][hidden][nonextensible][dual] */ EXTERN_C const IID IID_Field20; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("0000154C-0000-0010-8000-00AA006D2EA4") Field20 : public _ADO { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_ActualSize( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Attributes( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_DefinedSize( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Name( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Type( /* [retval][out] */ __RPC__out DataTypeEnum *pDataType) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Value( /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Value( /* [in] */ VARIANT Val) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Precision( /* [retval][out] */ __RPC__out BYTE *pbPrecision) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_NumericScale( /* [retval][out] */ __RPC__out BYTE *pbNumericScale) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE AppendChunk( /* [in] */ VARIANT Data) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE GetChunk( /* [in] */ long Length, /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_OriginalValue( /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_UnderlyingValue( /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get_DataFormat( /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppiDF) = 0; virtual /* [propputref][id] */ HRESULT STDMETHODCALLTYPE putref_DataFormat( /* [in] */ __RPC__in_opt IUnknown *piDF) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Precision( /* [in] */ BYTE bPrecision) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_NumericScale( /* [in] */ BYTE bScale) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Type( /* [in] */ DataTypeEnum DataType) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_DefinedSize( /* [in] */ long lSize) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Attributes( /* [in] */ long lAttributes) = 0; }; #else /* C style interface */ typedef struct Field20Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in Field20 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in Field20 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in Field20 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in Field20 * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in Field20 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in Field20 * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( Field20 * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActualSize )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Attributes )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DefinedSize )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__out DataTypeEnum *pDataType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Value )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Value )( __RPC__in Field20 * This, /* [in] */ VARIANT Val); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Precision )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__out BYTE *pbPrecision); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_NumericScale )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__out BYTE *pbNumericScale); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *AppendChunk )( __RPC__in Field20 * This, /* [in] */ VARIANT Data); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetChunk )( __RPC__in Field20 * This, /* [in] */ long Length, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_OriginalValue )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_UnderlyingValue )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DataFormat )( __RPC__in Field20 * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppiDF); /* [propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_DataFormat )( __RPC__in Field20 * This, /* [in] */ __RPC__in_opt IUnknown *piDF); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Precision )( __RPC__in Field20 * This, /* [in] */ BYTE bPrecision); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_NumericScale )( __RPC__in Field20 * This, /* [in] */ BYTE bScale); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Type )( __RPC__in Field20 * This, /* [in] */ DataTypeEnum DataType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_DefinedSize )( __RPC__in Field20 * This, /* [in] */ long lSize); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Attributes )( __RPC__in Field20 * This, /* [in] */ long lAttributes); END_INTERFACE } Field20Vtbl; interface Field20 { CONST_VTBL struct Field20Vtbl *lpVtbl; }; #ifdef COBJMACROS #define Field20_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Field20_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Field20_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Field20_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Field20_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Field20_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Field20_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Field20_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define Field20_get_ActualSize(This,pl) \ ( (This)->lpVtbl -> get_ActualSize(This,pl) ) #define Field20_get_Attributes(This,pl) \ ( (This)->lpVtbl -> get_Attributes(This,pl) ) #define Field20_get_DefinedSize(This,pl) \ ( (This)->lpVtbl -> get_DefinedSize(This,pl) ) #define Field20_get_Name(This,pbstr) \ ( (This)->lpVtbl -> get_Name(This,pbstr) ) #define Field20_get_Type(This,pDataType) \ ( (This)->lpVtbl -> get_Type(This,pDataType) ) #define Field20_get_Value(This,pvar) \ ( (This)->lpVtbl -> get_Value(This,pvar) ) #define Field20_put_Value(This,Val) \ ( (This)->lpVtbl -> put_Value(This,Val) ) #define Field20_get_Precision(This,pbPrecision) \ ( (This)->lpVtbl -> get_Precision(This,pbPrecision) ) #define Field20_get_NumericScale(This,pbNumericScale) \ ( (This)->lpVtbl -> get_NumericScale(This,pbNumericScale) ) #define Field20_AppendChunk(This,Data) \ ( (This)->lpVtbl -> AppendChunk(This,Data) ) #define Field20_GetChunk(This,Length,pvar) \ ( (This)->lpVtbl -> GetChunk(This,Length,pvar) ) #define Field20_get_OriginalValue(This,pvar) \ ( (This)->lpVtbl -> get_OriginalValue(This,pvar) ) #define Field20_get_UnderlyingValue(This,pvar) \ ( (This)->lpVtbl -> get_UnderlyingValue(This,pvar) ) #define Field20_get_DataFormat(This,ppiDF) \ ( (This)->lpVtbl -> get_DataFormat(This,ppiDF) ) #define Field20_putref_DataFormat(This,piDF) \ ( (This)->lpVtbl -> putref_DataFormat(This,piDF) ) #define Field20_put_Precision(This,bPrecision) \ ( (This)->lpVtbl -> put_Precision(This,bPrecision) ) #define Field20_put_NumericScale(This,bScale) \ ( (This)->lpVtbl -> put_NumericScale(This,bScale) ) #define Field20_put_Type(This,DataType) \ ( (This)->lpVtbl -> put_Type(This,DataType) ) #define Field20_put_DefinedSize(This,lSize) \ ( (This)->lpVtbl -> put_DefinedSize(This,lSize) ) #define Field20_put_Attributes(This,lAttributes) \ ( (This)->lpVtbl -> put_Attributes(This,lAttributes) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Field20_INTERFACE_DEFINED__ */ #ifndef __Field_INTERFACE_DEFINED__ #define __Field_INTERFACE_DEFINED__ /* interface ADOField */ /* [object][helpcontext][uuid][hidden][nonextensible][dual] */ EXTERN_C const IID IID_Field; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001569-0000-0010-8000-00AA006D2EA4") ADOField : public Field20 { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Status( /* [retval][out] */ __RPC__out long *pFStatus) = 0; }; #else /* C style interface */ typedef struct FieldVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOField * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOField * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOField * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ADOField * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ADOField * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ADOField * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ADOField * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ActualSize )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Attributes )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DefinedSize )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__out DataTypeEnum *pDataType); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Value )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Value )( __RPC__in ADOField * This, /* [in] */ VARIANT Val); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Precision )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__out BYTE *pbPrecision); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_NumericScale )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__out BYTE *pbNumericScale); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *AppendChunk )( __RPC__in ADOField * This, /* [in] */ VARIANT Data); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *GetChunk )( __RPC__in ADOField * This, /* [in] */ long Length, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_OriginalValue )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_UnderlyingValue )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_DataFormat )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppiDF); /* [propputref][id] */ HRESULT ( STDMETHODCALLTYPE *putref_DataFormat )( __RPC__in ADOField * This, /* [in] */ __RPC__in_opt IUnknown *piDF); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Precision )( __RPC__in ADOField * This, /* [in] */ BYTE bPrecision); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_NumericScale )( __RPC__in ADOField * This, /* [in] */ BYTE bScale); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Type )( __RPC__in ADOField * This, /* [in] */ DataTypeEnum DataType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_DefinedSize )( __RPC__in ADOField * This, /* [in] */ long lSize); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Attributes )( __RPC__in ADOField * This, /* [in] */ long lAttributes); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( __RPC__in ADOField * This, /* [retval][out] */ __RPC__out long *pFStatus); END_INTERFACE } FieldVtbl; interface Field { CONST_VTBL struct FieldVtbl *lpVtbl; }; #ifdef COBJMACROS #define Field_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Field_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Field_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Field_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Field_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Field_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Field_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Field_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define Field_get_ActualSize(This,pl) \ ( (This)->lpVtbl -> get_ActualSize(This,pl) ) #define Field_get_Attributes(This,pl) \ ( (This)->lpVtbl -> get_Attributes(This,pl) ) #define Field_get_DefinedSize(This,pl) \ ( (This)->lpVtbl -> get_DefinedSize(This,pl) ) #define Field_get_Name(This,pbstr) \ ( (This)->lpVtbl -> get_Name(This,pbstr) ) #define Field_get_Type(This,pDataType) \ ( (This)->lpVtbl -> get_Type(This,pDataType) ) #define Field_get_Value(This,pvar) \ ( (This)->lpVtbl -> get_Value(This,pvar) ) #define Field_put_Value(This,Val) \ ( (This)->lpVtbl -> put_Value(This,Val) ) #define Field_get_Precision(This,pbPrecision) \ ( (This)->lpVtbl -> get_Precision(This,pbPrecision) ) #define Field_get_NumericScale(This,pbNumericScale) \ ( (This)->lpVtbl -> get_NumericScale(This,pbNumericScale) ) #define Field_AppendChunk(This,Data) \ ( (This)->lpVtbl -> AppendChunk(This,Data) ) #define Field_GetChunk(This,Length,pvar) \ ( (This)->lpVtbl -> GetChunk(This,Length,pvar) ) #define Field_get_OriginalValue(This,pvar) \ ( (This)->lpVtbl -> get_OriginalValue(This,pvar) ) #define Field_get_UnderlyingValue(This,pvar) \ ( (This)->lpVtbl -> get_UnderlyingValue(This,pvar) ) #define Field_get_DataFormat(This,ppiDF) \ ( (This)->lpVtbl -> get_DataFormat(This,ppiDF) ) #define Field_putref_DataFormat(This,piDF) \ ( (This)->lpVtbl -> putref_DataFormat(This,piDF) ) #define Field_put_Precision(This,bPrecision) \ ( (This)->lpVtbl -> put_Precision(This,bPrecision) ) #define Field_put_NumericScale(This,bScale) \ ( (This)->lpVtbl -> put_NumericScale(This,bScale) ) #define Field_put_Type(This,DataType) \ ( (This)->lpVtbl -> put_Type(This,DataType) ) #define Field_put_DefinedSize(This,lSize) \ ( (This)->lpVtbl -> put_DefinedSize(This,lSize) ) #define Field_put_Attributes(This,lAttributes) \ ( (This)->lpVtbl -> put_Attributes(This,lAttributes) ) #define Field_get_Status(This,pFStatus) \ ( (This)->lpVtbl -> get_Status(This,pFStatus) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Field_INTERFACE_DEFINED__ */ #ifndef __Fields15_INTERFACE_DEFINED__ #define __Fields15_INTERFACE_DEFINED__ /* interface Fields15 */ /* [object][helpcontext][uuid][hidden][nonextensible][dual] */ EXTERN_C const IID IID_Fields15; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001506-0000-0010-8000-00AA006D2EA4") Fields15 : public _ADOCollection { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Item( /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__deref_out_opt ADOField **ppvObject) = 0; }; #else /* C style interface */ typedef struct Fields15Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in Fields15 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in Fields15 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in Fields15 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in Fields15 * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in Fields15 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in Fields15 * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( Fields15 * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [id][helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( __RPC__in Fields15 * This, /* [retval][out] */ __RPC__out long *c); /* [id][restricted] */ HRESULT ( STDMETHODCALLTYPE *_NewEnum )( __RPC__in Fields15 * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppvObject); /* [id][helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Refresh )( __RPC__in Fields15 * This); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( __RPC__in Fields15 * This, /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__deref_out_opt ADOField **ppvObject); END_INTERFACE } Fields15Vtbl; interface Fields15 { CONST_VTBL struct Fields15Vtbl *lpVtbl; }; #ifdef COBJMACROS #define Fields15_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Fields15_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Fields15_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Fields15_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Fields15_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Fields15_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Fields15_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Fields15_get_Count(This,c) \ ( (This)->lpVtbl -> get_Count(This,c) ) #define Fields15__NewEnum(This,ppvObject) \ ( (This)->lpVtbl -> _NewEnum(This,ppvObject) ) #define Fields15_Refresh(This) \ ( (This)->lpVtbl -> Refresh(This) ) #define Fields15_get_Item(This,Index,ppvObject) \ ( (This)->lpVtbl -> get_Item(This,Index,ppvObject) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Fields15_INTERFACE_DEFINED__ */ #ifndef __Fields20_INTERFACE_DEFINED__ #define __Fields20_INTERFACE_DEFINED__ /* interface Fields20 */ /* [object][helpcontext][uuid][hidden][nonextensible][dual] */ EXTERN_C const IID IID_Fields20; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("0000154D-0000-0010-8000-00AA006D2EA4") Fields20 : public Fields15 { public: virtual /* [hidden] */ HRESULT STDMETHODCALLTYPE _Append( /* [in] */ __RPC__in BSTR Name, /* [in] */ DataTypeEnum Type, /* [defaultvalue][in] */ long DefinedSize = 0, /* [defaultvalue][in] */ FieldAttributeEnum Attrib = adFldUnspecified) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Delete( /* [in] */ VARIANT Index) = 0; }; #else /* C style interface */ typedef struct Fields20Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in Fields20 * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in Fields20 * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in Fields20 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in Fields20 * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in Fields20 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in Fields20 * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( Fields20 * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [id][helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( __RPC__in Fields20 * This, /* [retval][out] */ __RPC__out long *c); /* [id][restricted] */ HRESULT ( STDMETHODCALLTYPE *_NewEnum )( __RPC__in Fields20 * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppvObject); /* [id][helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Refresh )( __RPC__in Fields20 * This); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( __RPC__in Fields20 * This, /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__deref_out_opt ADOField **ppvObject); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_Append )( __RPC__in Fields20 * This, /* [in] */ __RPC__in BSTR Name, /* [in] */ DataTypeEnum Type, /* [defaultvalue][in] */ long DefinedSize, /* [defaultvalue][in] */ FieldAttributeEnum Attrib); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Delete )( __RPC__in Fields20 * This, /* [in] */ VARIANT Index); END_INTERFACE } Fields20Vtbl; interface Fields20 { CONST_VTBL struct Fields20Vtbl *lpVtbl; }; #ifdef COBJMACROS #define Fields20_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Fields20_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Fields20_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Fields20_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Fields20_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Fields20_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Fields20_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Fields20_get_Count(This,c) \ ( (This)->lpVtbl -> get_Count(This,c) ) #define Fields20__NewEnum(This,ppvObject) \ ( (This)->lpVtbl -> _NewEnum(This,ppvObject) ) #define Fields20_Refresh(This) \ ( (This)->lpVtbl -> Refresh(This) ) #define Fields20_get_Item(This,Index,ppvObject) \ ( (This)->lpVtbl -> get_Item(This,Index,ppvObject) ) #define Fields20__Append(This,Name,Type,DefinedSize,Attrib) \ ( (This)->lpVtbl -> _Append(This,Name,Type,DefinedSize,Attrib) ) #define Fields20_Delete(This,Index) \ ( (This)->lpVtbl -> Delete(This,Index) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Fields20_INTERFACE_DEFINED__ */ #ifndef __Fields_INTERFACE_DEFINED__ #define __Fields_INTERFACE_DEFINED__ /* interface ADOFields */ /* [object][helpcontext][uuid][hidden][nonextensible][dual] */ EXTERN_C const IID IID_Fields; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00001564-0000-0010-8000-00AA006D2EA4") ADOFields : public Fields20 { public: virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Append( /* [in] */ __RPC__in BSTR Name, /* [in] */ DataTypeEnum Type, /* [defaultvalue][in] */ long DefinedSize, /* [defaultvalue][in] */ FieldAttributeEnum Attrib, /* [optional][in] */ VARIANT FieldValue) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Update( void) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE Resync( /* [defaultvalue][in] */ ResyncEnum ResyncValues = adResyncAllValues) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE CancelUpdate( void) = 0; }; #else /* C style interface */ typedef struct FieldsVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOFields * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOFields * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOFields * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ADOFields * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ADOFields * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ADOFields * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ADOFields * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [id][helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( __RPC__in ADOFields * This, /* [retval][out] */ __RPC__out long *c); /* [id][restricted] */ HRESULT ( STDMETHODCALLTYPE *_NewEnum )( __RPC__in ADOFields * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppvObject); /* [id][helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Refresh )( __RPC__in ADOFields * This); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( __RPC__in ADOFields * This, /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__deref_out_opt ADOField **ppvObject); /* [hidden] */ HRESULT ( STDMETHODCALLTYPE *_Append )( __RPC__in ADOFields * This, /* [in] */ __RPC__in BSTR Name, /* [in] */ DataTypeEnum Type, /* [defaultvalue][in] */ long DefinedSize, /* [defaultvalue][in] */ FieldAttributeEnum Attrib); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Delete )( __RPC__in ADOFields * This, /* [in] */ VARIANT Index); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Append )( __RPC__in ADOFields * This, /* [in] */ __RPC__in BSTR Name, /* [in] */ DataTypeEnum Type, /* [defaultvalue][in] */ long DefinedSize, /* [defaultvalue][in] */ FieldAttributeEnum Attrib, /* [optional][in] */ VARIANT FieldValue); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Update )( __RPC__in ADOFields * This); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *Resync )( __RPC__in ADOFields * This, /* [defaultvalue][in] */ ResyncEnum ResyncValues); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *CancelUpdate )( __RPC__in ADOFields * This); END_INTERFACE } FieldsVtbl; interface Fields { CONST_VTBL struct FieldsVtbl *lpVtbl; }; #ifdef COBJMACROS #define Fields_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Fields_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Fields_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Fields_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Fields_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Fields_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Fields_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Fields_get_Count(This,c) \ ( (This)->lpVtbl -> get_Count(This,c) ) #define Fields__NewEnum(This,ppvObject) \ ( (This)->lpVtbl -> _NewEnum(This,ppvObject) ) #define Fields_Refresh(This) \ ( (This)->lpVtbl -> Refresh(This) ) #define Fields_get_Item(This,Index,ppvObject) \ ( (This)->lpVtbl -> get_Item(This,Index,ppvObject) ) #define Fields__Append(This,Name,Type,DefinedSize,Attrib) \ ( (This)->lpVtbl -> _Append(This,Name,Type,DefinedSize,Attrib) ) #define Fields_Delete(This,Index) \ ( (This)->lpVtbl -> Delete(This,Index) ) #define Fields_Append(This,Name,Type,DefinedSize,Attrib,FieldValue) \ ( (This)->lpVtbl -> Append(This,Name,Type,DefinedSize,Attrib,FieldValue) ) #define Fields_Update(This) \ ( (This)->lpVtbl -> Update(This) ) #define Fields_Resync(This,ResyncValues) \ ( (This)->lpVtbl -> Resync(This,ResyncValues) ) #define Fields_CancelUpdate(This) \ ( (This)->lpVtbl -> CancelUpdate(This) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Fields_INTERFACE_DEFINED__ */ #ifndef ___Parameter_INTERFACE_DEFINED__ #define ___Parameter_INTERFACE_DEFINED__ /* interface _ADOParameter */ /* [object][helpcontext][uuid][hidden][nonextensible][dual] */ EXTERN_C const IID IID__Parameter; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("0000150C-0000-0010-8000-00AA006D2EA4") _ADOParameter : public _ADO { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Name( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Name( /* [in] */ __RPC__in BSTR bstr) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Value( /* [retval][out] */ __RPC__out VARIANT *pvar) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Value( /* [in] */ VARIANT val) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Type( /* [retval][out] */ __RPC__out DataTypeEnum *psDataType) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Type( /* [in] */ DataTypeEnum sDataType) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Direction( /* [in] */ ParameterDirectionEnum lParmDirection) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Direction( /* [retval][out] */ __RPC__out ParameterDirectionEnum *plParmDirection) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Precision( /* [in] */ BYTE bPrecision) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Precision( /* [retval][out] */ __RPC__out BYTE *pbPrecision) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_NumericScale( /* [in] */ BYTE bScale) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_NumericScale( /* [retval][out] */ __RPC__out BYTE *pbScale) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Size( /* [in] */ long l) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Size( /* [retval][out] */ __RPC__out long *pl) = 0; virtual /* [helpcontext][id] */ HRESULT STDMETHODCALLTYPE AppendChunk( /* [in] */ VARIANT Val) = 0; virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Attributes( /* [retval][out] */ __RPC__out LONG *plParmAttribs) = 0; virtual /* [helpcontext][propput][id] */ HRESULT STDMETHODCALLTYPE put_Attributes( /* [in] */ LONG lParmAttribs) = 0; }; #else /* C style interface */ typedef struct _ParameterVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in _ADOParameter * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in _ADOParameter * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in _ADOParameter * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in _ADOParameter * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in _ADOParameter * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in _ADOParameter * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( _ADOParameter * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( __RPC__in _ADOParameter * This, /* [retval][out] */ __RPC__deref_out_opt ADOProperties **ppvObject); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( __RPC__in _ADOParameter * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Name )( __RPC__in _ADOParameter * This, /* [in] */ __RPC__in BSTR bstr); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Value )( __RPC__in _ADOParameter * This, /* [retval][out] */ __RPC__out VARIANT *pvar); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Value )( __RPC__in _ADOParameter * This, /* [in] */ VARIANT val); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( __RPC__in _ADOParameter * This, /* [retval][out] */ __RPC__out DataTypeEnum *psDataType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Type )( __RPC__in _ADOParameter * This, /* [in] */ DataTypeEnum sDataType); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Direction )( __RPC__in _ADOParameter * This, /* [in] */ ParameterDirectionEnum lParmDirection); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Direction )( __RPC__in _ADOParameter * This, /* [retval][out] */ __RPC__out ParameterDirectionEnum *plParmDirection); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Precision )( __RPC__in _ADOParameter * This, /* [in] */ BYTE bPrecision); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Precision )( __RPC__in _ADOParameter * This, /* [retval][out] */ __RPC__out BYTE *pbPrecision); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_NumericScale )( __RPC__in _ADOParameter * This, /* [in] */ BYTE bScale); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_NumericScale )( __RPC__in _ADOParameter * This, /* [retval][out] */ __RPC__out BYTE *pbScale); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Size )( __RPC__in _ADOParameter * This, /* [in] */ long l); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Size )( __RPC__in _ADOParameter * This, /* [retval][out] */ __RPC__out long *pl); /* [helpcontext][id] */ HRESULT ( STDMETHODCALLTYPE *AppendChunk )( __RPC__in _ADOParameter * This, /* [in] */ VARIANT Val); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Attributes )( __RPC__in _ADOParameter * This, /* [retval][out] */ __RPC__out LONG *plParmAttribs); /* [helpcontext][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Attributes )( __RPC__in _ADOParameter * This, /* [in] */ LONG lParmAttribs); END_INTERFACE } _ParameterVtbl; interface _Parameter { CONST_VTBL struct _ParameterVtbl *lpVtbl; }; #ifdef COBJMACROS #define _Parameter_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _Parameter_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define _Parameter_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define _Parameter_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _Parameter_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _Parameter_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _Parameter_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _Parameter_get_Properties(This,ppvObject) \ ( (This)->lpVtbl -> get_Properties(This,ppvObject) ) #define _Parameter_get_Name(This,pbstr) \ ( (This)->lpVtbl -> get_Name(This,pbstr) ) #define _Parameter_put_Name(This,bstr) \ ( (This)->lpVtbl -> put_Name(This,bstr) ) #define _Parameter_get_Value(This,pvar) \ ( (This)->lpVtbl -> get_Value(This,pvar) ) #define _Parameter_put_Value(This,val) \ ( (This)->lpVtbl -> put_Value(This,val) ) #define _Parameter_get_Type(This,psDataType) \ ( (This)->lpVtbl -> get_Type(This,psDataType) ) #define _Parameter_put_Type(This,sDataType) \ ( (This)->lpVtbl -> put_Type(This,sDataType) ) #define _Parameter_put_Direction(This,lParmDirection) \ ( (This)->lpVtbl -> put_Direction(This,lParmDirection) ) #define _Parameter_get_Direction(This,plParmDirection) \ ( (This)->lpVtbl -> get_Direction(This,plParmDirection) ) #define _Parameter_put_Precision(This,bPrecision) \ ( (This)->lpVtbl -> put_Precision(This,bPrecision) ) #define _Parameter_get_Precision(This,pbPrecision) \ ( (This)->lpVtbl -> get_Precision(This,pbPrecision) ) #define _Parameter_put_NumericScale(This,bScale) \ ( (This)->lpVtbl -> put_NumericScale(This,bScale) ) #define _Parameter_get_NumericScale(This,pbScale) \ ( (This)->lpVtbl -> get_NumericScale(This,pbScale) ) #define _Parameter_put_Size(This,l) \ ( (This)->lpVtbl -> put_Size(This,l) ) #define _Parameter_get_Size(This,pl) \ ( (This)->lpVtbl -> get_Size(This,pl) ) #define _Parameter_AppendChunk(This,Val) \ ( (This)->lpVtbl -> AppendChunk(This,Val) ) #define _Parameter_get_Attributes(This,plParmAttribs) \ ( (This)->lpVtbl -> get_Attributes(This,plParmAttribs) ) #define _Parameter_put_Attributes(This,lParmAttribs) \ ( (This)->lpVtbl -> put_Attributes(This,lParmAttribs) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* ___Parameter_INTERFACE_DEFINED__ */ EXTERN_C const CLSID CLSID_Parameter; #ifdef __cplusplus Parameter; #endif #ifndef __Parameters_INTERFACE_DEFINED__ #define __Parameters_INTERFACE_DEFINED__ /* interface ADOParameters */ /* [object][helpcontext][uuid][nonextensible][dual] */ EXTERN_C const IID IID_Parameters; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("0000150D-0000-0010-8000-00AA006D2EA4") ADOParameters : public _ADODynaCollection { public: virtual /* [helpcontext][propget][id] */ HRESULT STDMETHODCALLTYPE get_Item( /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__deref_out_opt _ADOParameter **ppvObject) = 0; }; #else /* C style interface */ typedef struct ParametersVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOParameters * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOParameters * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOParameters * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ADOParameters * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ADOParameters * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ADOParameters * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ADOParameters * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [id][helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( __RPC__in ADOParameters * This, /* [retval][out] */ __RPC__out long *c); /* [id][restricted] */ HRESULT ( STDMETHODCALLTYPE *_NewEnum )( __RPC__in ADOParameters * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppvObject); /* [id][helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Refresh )( __RPC__in ADOParameters * This); /* [helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Append )( __RPC__in ADOParameters * This, /* [in] */ __RPC__in_opt IDispatch *Object); /* [helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Delete )( __RPC__in ADOParameters * This, /* [in] */ VARIANT Index); /* [helpcontext][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( __RPC__in ADOParameters * This, /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__deref_out_opt _ADOParameter **ppvObject); END_INTERFACE } ParametersVtbl; interface Parameters { CONST_VTBL struct ParametersVtbl *lpVtbl; }; #ifdef COBJMACROS #define Parameters_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Parameters_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Parameters_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Parameters_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Parameters_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Parameters_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Parameters_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Parameters_get_Count(This,c) \ ( (This)->lpVtbl -> get_Count(This,c) ) #define Parameters__NewEnum(This,ppvObject) \ ( (This)->lpVtbl -> _NewEnum(This,ppvObject) ) #define Parameters_Refresh(This) \ ( (This)->lpVtbl -> Refresh(This) ) #define Parameters_Append(This,Object) \ ( (This)->lpVtbl -> Append(This,Object) ) #define Parameters_Delete(This,Index) \ ( (This)->lpVtbl -> Delete(This,Index) ) #define Parameters_get_Item(This,Index,ppvObject) \ ( (This)->lpVtbl -> get_Item(This,Index,ppvObject) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Parameters_INTERFACE_DEFINED__ */ #ifndef __Property_INTERFACE_DEFINED__ #define __Property_INTERFACE_DEFINED__ /* interface ADOProperty */ /* [object][helpcontext][uuid][nonextensible][dual] */ EXTERN_C const IID IID_Property; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000503-0000-0010-8000-00AA006D2EA4") ADOProperty : public IDispatch { public: virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Value( /* [retval][out] */ __RPC__out VARIANT *pval) = 0; virtual /* [helpcontext][id][propput] */ HRESULT STDMETHODCALLTYPE put_Value( /* [in] */ VARIANT val) = 0; virtual /* [helpcontext][propget] */ HRESULT STDMETHODCALLTYPE get_Name( /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr) = 0; virtual /* [helpcontext][propget] */ HRESULT STDMETHODCALLTYPE get_Type( /* [retval][out] */ __RPC__out DataTypeEnum *ptype) = 0; virtual /* [helpcontext][propget] */ HRESULT STDMETHODCALLTYPE get_Attributes( /* [retval][out] */ __RPC__out long *plAttributes) = 0; virtual /* [helpcontext][propput] */ HRESULT STDMETHODCALLTYPE put_Attributes( /* [in] */ long lAttributes) = 0; }; #else /* C style interface */ typedef struct PropertyVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOProperty * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOProperty * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOProperty * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ADOProperty * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ADOProperty * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ADOProperty * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ADOProperty * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Value )( __RPC__in ADOProperty * This, /* [retval][out] */ __RPC__out VARIANT *pval); /* [helpcontext][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Value )( __RPC__in ADOProperty * This, /* [in] */ VARIANT val); /* [helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( __RPC__in ADOProperty * This, /* [retval][out] */ __RPC__deref_out_opt BSTR *pbstr); /* [helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( __RPC__in ADOProperty * This, /* [retval][out] */ __RPC__out DataTypeEnum *ptype); /* [helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Attributes )( __RPC__in ADOProperty * This, /* [retval][out] */ __RPC__out long *plAttributes); /* [helpcontext][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Attributes )( __RPC__in ADOProperty * This, /* [in] */ long lAttributes); END_INTERFACE } PropertyVtbl; interface Property { CONST_VTBL struct PropertyVtbl *lpVtbl; }; #ifdef COBJMACROS #define Property_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Property_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Property_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Property_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Property_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Property_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Property_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Property_get_Value(This,pval) \ ( (This)->lpVtbl -> get_Value(This,pval) ) #define Property_put_Value(This,val) \ ( (This)->lpVtbl -> put_Value(This,val) ) #define Property_get_Name(This,pbstr) \ ( (This)->lpVtbl -> get_Name(This,pbstr) ) #define Property_get_Type(This,ptype) \ ( (This)->lpVtbl -> get_Type(This,ptype) ) #define Property_get_Attributes(This,plAttributes) \ ( (This)->lpVtbl -> get_Attributes(This,plAttributes) ) #define Property_put_Attributes(This,lAttributes) \ ( (This)->lpVtbl -> put_Attributes(This,lAttributes) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Property_INTERFACE_DEFINED__ */ #ifndef __Properties_INTERFACE_DEFINED__ #define __Properties_INTERFACE_DEFINED__ /* interface ADOProperties */ /* [object][helpcontext][uuid][nonextensible][dual] */ EXTERN_C const IID IID_Properties; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00000504-0000-0010-8000-00AA006D2EA4") ADOProperties : public _ADOCollection { public: virtual /* [helpcontext][id][propget] */ HRESULT STDMETHODCALLTYPE get_Item( /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__deref_out_opt ADOProperty **ppvObject) = 0; }; #else /* C style interface */ typedef struct PropertiesVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( __RPC__in ADOProperties * This, /* [in] */ __RPC__in REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( __RPC__in ADOProperties * This); ULONG ( STDMETHODCALLTYPE *Release )( __RPC__in ADOProperties * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( __RPC__in ADOProperties * This, /* [out] */ __RPC__out UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( __RPC__in ADOProperties * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( __RPC__in ADOProperties * This, /* [in] */ __RPC__in REFIID riid, /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( ADOProperties * This, /* [annotation][in] */ _In_ DISPID dispIdMember, /* [annotation][in] */ _In_ REFIID riid, /* [annotation][in] */ _In_ LCID lcid, /* [annotation][in] */ _In_ WORD wFlags, /* [annotation][out][in] */ _In_ DISPPARAMS *pDispParams, /* [annotation][out] */ _Out_opt_ VARIANT *pVarResult, /* [annotation][out] */ _Out_opt_ EXCEPINFO *pExcepInfo, /* [annotation][out] */ _Out_opt_ UINT *puArgErr); /* [id][helpcontext][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( __RPC__in ADOProperties * This, /* [retval][out] */ __RPC__out long *c); /* [id][restricted] */ HRESULT ( STDMETHODCALLTYPE *_NewEnum )( __RPC__in ADOProperties * This, /* [retval][out] */ __RPC__deref_out_opt IUnknown **ppvObject); /* [id][helpcontext] */ HRESULT ( STDMETHODCALLTYPE *Refresh )( __RPC__in ADOProperties * This); /* [helpcontext][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( __RPC__in ADOProperties * This, /* [in] */ VARIANT Index, /* [retval][out] */ __RPC__deref_out_opt ADOProperty **ppvObject); END_INTERFACE } PropertiesVtbl; interface Properties { CONST_VTBL struct PropertiesVtbl *lpVtbl; }; #ifdef COBJMACROS #define Properties_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Properties_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define Properties_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define Properties_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Properties_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Properties_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Properties_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Properties_get_Count(This,c) \ ( (This)->lpVtbl -> get_Count(This,c) ) #define Properties__NewEnum(This,ppvObject) \ ( (This)->lpVtbl -> _NewEnum(This,ppvObject) ) #define Properties_Refresh(This) \ ( (This)->lpVtbl -> Refresh(This) ) #define Properties_get_Item(This,Index,ppvObject) \ ( (This)->lpVtbl -> get_Item(This,Index,ppvObject) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __Properties_INTERFACE_DEFINED__ */ #endif /* __ADODB_LIBRARY_DEFINED__ */ /* interface __MIDL_itf_ado10_0000_0001 */ /* [local] */ extern RPC_IF_HANDLE __MIDL_itf_ado10_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_ado10_0000_0001_v0_0_s_ifspec; /* Additional Prototypes for ALL interfaces */ /* end of Additional Prototypes */ #ifdef __cplusplus } #endif #endif #define ADOCommand _ADOCommand #define ADORecordset _ADORecordset #define ADOTransaction _ADOTransaction #define ADOParameter _ADOParameter #define ADOConnection _ADOConnection #define ADOCollection _ADOCollection #define ADODynaCollection _ADODynaCollection #define ADORecord _ADORecord #define ADORecField _ADORecField #define ADOStream _ADOStream #endif // _ADOINT_H_ #endif // !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_WIN8)
1fb6ee6ff00e5baf9e290864b62af9b8abdcc124
c8d2a9b12c0576b91d80c9a46b2bcf4c03dc895d
/algebra/mkl/lin_sys/direct/pardiso_interface.c
2ac9ffd62af03e77bb908dee9ee781d499ffbb02
[ "Apache-2.0" ]
permissive
osqp/osqp
57a861bb94e3f11343eac889d20b7f360796b9bb
1ac3fab74ddeebb0a24b8b7f96e1e539423d4a6a
refs/heads/master
2023-08-09T03:00:11.912481
2023-07-14T13:57:33
2023-07-14T13:57:33
69,313,892
653
141
Apache-2.0
2023-09-01T15:11:59
2016-09-27T03:02:46
C
UTF-8
C
false
false
10,999
c
pardiso_interface.c
#include "pardiso_interface.h" #include "algebra_impl.h" #include "printing.h" #if OSQP_EMBEDDED_MODE != 1 #include "kkt.h" #endif #include "mkl_service.h" #include "mkl_pardiso.h" // Solver Phases #define PARDISO_SYMBOLIC (11) #define PARDISO_NUMERIC (22) #define PARDISO_SOLVE (33) #define PARDISO_CLEANUP (-1) void update_settings_linsys_solver_pardiso(pardiso_solver* s, const OSQPSettings* settings) { return; } // Warm starting not used by direct solvers void warm_start_linsys_solver_pardiso(pardiso_solver* s, const OSQPVectorf* x) { return; } // Free LDL Factorization structure void free_linsys_solver_pardiso(pardiso_solver* s) { if (s) { // Free pardiso solver using internal function s->phase = PARDISO_CLEANUP; PARDISO (s->pt, &(s->maxfct), &(s->mnum), &(s->mtype), &(s->phase), &(s->nKKT), &(s->fdum), s->KKT_p, s->KKT_i, &(s->idum), &(s->nrhs), s->iparm, &(s->msglvl), &(s->fdum), &(s->fdum), &(s->error)); if ( s->error != 0 ){ c_eprint("Error during MKL Pardiso cleanup: %d", (int)s->error); } // Check each attribute of the structure and free it if it exists if (s->KKT) csc_spfree(s->KKT); if (s->KKT_i) c_free(s->KKT_i); if (s->KKT_p) c_free(s->KKT_p); if (s->bp) c_free(s->bp); if (s->sol) c_free(s->sol); if (s->rho_inv_vec) c_free(s->rho_inv_vec); // These are required for matrix updates if (s->PtoKKT) c_free(s->PtoKKT); if (s->AtoKKT) c_free(s->AtoKKT); if (s->rhotoKKT) c_free(s->rhotoKKT); c_free(s); } } // Initialize factorization structure OSQPInt init_linsys_solver_pardiso(pardiso_solver** sp, const OSQPMatrix* P, const OSQPMatrix* A, const OSQPVectorf* rho_vec, const OSQPSettings* settings, OSQPInt polishing) { OSQPInt i; // loop counter OSQPInt nnzKKT; // Number of nonzeros in KKT OSQPInt m, n; // Dimensions of A OSQPInt n_plus_m; // n_plus_m dimension OSQPFloat* rhov; // used for direct access to rho_vec data when polishing=false OSQPFloat sigma = settings->sigma; // Allocate private structure to store KKT factorization pardiso_solver *s = c_calloc(1, sizeof(pardiso_solver)); *sp = s; // Size of KKT n = P->csc->n; m = A->csc->m; s->n = n; s->m = m; n_plus_m = n + m; s->nKKT = n_plus_m; // Sigma parameter s->sigma = sigma; // Polishing flag s->polishing = polishing; // Link Functions s->name = &name_pardiso; s->solve = &solve_linsys_pardiso; s->free = &free_linsys_solver_pardiso; s->warm_start = &warm_start_linsys_solver_pardiso; s->update_matrices = &update_linsys_solver_matrices_pardiso; s->update_rho_vec = &update_linsys_solver_rho_vec_pardiso; s->update_settings = &update_settings_linsys_solver_pardiso; // Assign type s->type = OSQP_DIRECT_SOLVER; // Working vector s->bp = (OSQPFloat *)c_malloc(sizeof(OSQPFloat) * n_plus_m); // Solution vector s->sol = (OSQPFloat *)c_malloc(sizeof(OSQPFloat) * n_plus_m); // Parameter vector if (rho_vec) { s->rho_inv_vec = (OSQPFloat *)c_malloc(sizeof(OSQPFloat) * n_plus_m); } // else it is NULL // Form KKT matrix if (polishing){ // Called from polish() s->KKT = form_KKT(P->csc,A->csc, 1, //format = 1 means CSR sigma, s->rho_inv_vec, sigma, OSQP_NULL, OSQP_NULL, OSQP_NULL); } else { // Called from ADMM algorithm // Allocate vectors of indices s->PtoKKT = c_malloc(P->csc->p[n] * sizeof(OSQPInt)); s->AtoKKT = c_malloc(A->csc->p[n] * sizeof(OSQPInt)); s->rhotoKKT = c_malloc(m * sizeof(OSQPInt)); // Use s->rho_inv_vec for storing param2 = rho_inv_vec if (rho_vec) { rhov = rho_vec->values; for (i = 0; i < m; i++){ s->rho_inv_vec[i] = 1. / rhov[i]; } } else { s->rho_inv = 1. / settings->rho; } s->KKT = form_KKT(P->csc,A->csc, 1, //format = 1 means CSR sigma, s->rho_inv_vec, s->rho_inv, s->PtoKKT, s->AtoKKT,s->rhotoKKT); } // Check if matrix has been created if (!(s->KKT)) { c_eprint("Error in forming KKT matrix"); free_linsys_solver_pardiso(s); return OSQP_LINSYS_SOLVER_INIT_ERROR; } else { // Adjust indexing for Pardiso nnzKKT = s->KKT->p[n_plus_m]; s->KKT_i = c_malloc((nnzKKT) * sizeof(OSQPInt)); s->KKT_p = c_malloc((n_plus_m + 1) * sizeof(OSQPInt)); for(i = 0; i < nnzKKT; i++){ s->KKT_i[i] = s->KKT->i[i] + 1; } for(i = 0; i < n_plus_m+1; i++){ s->KKT_p[i] = s->KKT->p[i] + 1; } } // Set Pardiso variables s->mtype = -2; // Real symmetric indefinite matrix s->nrhs = 1; // Number of right hand sides s->maxfct = 1; // Maximum number of numerical factorizations s->mnum = 1; // Which factorization to use s->msglvl = 0; // Do not print statistical information s->error = 0; // Initialize error flag for ( i = 0; i < 64; i++ ) { s->iparm[i] = 0; // Setup Pardiso control parameters s->pt[i] = 0; // Initialize the internal solver memory pointer } s->iparm[0] = 1; // No solver default s->iparm[1] = 3; // Fill-in reordering from OpenMP if (polishing) { s->iparm[5] = 1; // Write solution into b } else { s->iparm[5] = 0; // Do NOT write solution into b } /* s->iparm[7] = 2; // Max number of iterative refinement steps */ s->iparm[7] = 0; // Number of iterative refinement steps (auto, performs them only if perturbed pivots are obtained) s->iparm[9] = 13; // Perturb the pivot elements with 1E-13 s->iparm[34] = 0; // Use Fortran-style indexing for indices /* s->iparm[34] = 1; // Use C-style indexing for indices */ #ifdef OSQP_USE_FLOAT s->iparm[27] = 1; // Input arrays and all internal arrays must be presented in single precision #else s->iparm[27] = 0; // Input arrays and all internal arrays must be presented in double precision #endif // Print number of threads s->nthreads = mkl_get_max_threads(); // Reordering and symbolic factorization s->phase = PARDISO_SYMBOLIC; PARDISO (s->pt, &(s->maxfct), &(s->mnum), &(s->mtype), &(s->phase), &(s->nKKT), s->KKT->x, s->KKT_p, s->KKT_i, &(s->idum), &(s->nrhs), s->iparm, &(s->msglvl), &(s->fdum), &(s->fdum), &(s->error)); if ( s->error != 0 ){ c_eprint("Error during symbolic factorization: %d", (int)s->error); free_linsys_solver_pardiso(s); *sp = OSQP_NULL; return OSQP_LINSYS_SOLVER_INIT_ERROR; } // Numerical factorization s->phase = PARDISO_NUMERIC; PARDISO (s->pt, &(s->maxfct), &(s->mnum), &(s->mtype), &(s->phase), &(s->nKKT), s->KKT->x, s->KKT_p, s->KKT_i, &(s->idum), &(s->nrhs), s->iparm, &(s->msglvl), &(s->fdum), &(s->fdum), &(s->error)); if ( s->error ){ c_eprint("Error during numerical factorization: %d", (int)s->error); free_linsys_solver_pardiso(s); *sp = OSQP_NULL; return OSQP_LINSYS_SOLVER_INIT_ERROR; } if ( s->iparm[21] < n ) { // Error: Number of positive eigenvalues of KKT should be the same as dimension of P c_eprint("KKT matrix has fewer positive eigenvalues than it should. The problem seems to be non-convex."); return OSQP_NONCVX_ERROR; } return 0; } const char* name_pardiso(pardiso_solver* s) { return "Pardiso"; } // Returns solution to linear system Ax = b with solution stored in b OSQPInt solve_linsys_pardiso(pardiso_solver* s, OSQPVectorf* b, OSQPInt admm_iter) { OSQPInt j; OSQPInt n = s->n; OSQPInt m = s->m; OSQPFloat* bv = b->values; // Back substitution and iterative refinement s->phase = PARDISO_SOLVE; PARDISO (s->pt, &(s->maxfct), &(s->mnum), &(s->mtype), &(s->phase), &(s->nKKT), s->KKT->x, s->KKT_p, s->KKT_i, &(s->idum), &(s->nrhs), s->iparm, &(s->msglvl), bv, s->sol, &(s->error)); if ( s->error != 0 ){ c_eprint("Error during linear system solution: %d", (int)s->error); return 1; } if (!(s->polishing)) { /* copy x_tilde from s->sol */ for (j = 0 ; j < n ; j++) { bv[j] = s->sol[j]; } /* compute z_tilde from b and s->sol */ if (s->rho_inv_vec) { for (j = 0 ; j < m ; j++) { bv[j + n] += s->rho_inv_vec[j] * s->sol[j + n]; } } else { for (j = 0 ; j < m ; j++) { bv[j + n] += s->rho_inv * s->sol[j + n]; } } } return 0; } // Update solver structure with new P and A OSQPInt update_linsys_solver_matrices_pardiso(pardiso_solver* s, const OSQPMatrix* P, const OSQPInt* Px_new_idx, OSQPInt P_new_n, const OSQPMatrix* A, const OSQPInt* Ax_new_idx, OSQPInt A_new_n) { // Update KKT matrix with new P update_KKT_P(s->KKT, P->csc, Px_new_idx, P_new_n, s->PtoKKT, s->sigma, 1); // Update KKT matrix with new A update_KKT_A(s->KKT, A->csc, Ax_new_idx, A_new_n, s->AtoKKT); // Perform numerical factorization s->phase = PARDISO_NUMERIC; PARDISO (s->pt, &(s->maxfct), &(s->mnum), &(s->mtype), &(s->phase), &(s->nKKT), s->KKT->x, s->KKT_p, s->KKT_i, &(s->idum), &(s->nrhs), s->iparm, &(s->msglvl), &(s->fdum), &(s->fdum), &(s->error)); // Return exit flag return s->error; } OSQPInt update_linsys_solver_rho_vec_pardiso(pardiso_solver* s, const OSQPVectorf* rho_vec, OSQPFloat rho_sc) { OSQPInt i; OSQPInt m = s->m; OSQPFloat* rhov; // Update internal rho_inv_vec if (s->rho_inv_vec != OSQP_NULL) { rhov = rho_vec->values; for (i = 0; i < m; i++){ s->rho_inv_vec[i] = 1. / rhov[i]; } } else { s->rho_inv = 1. / rho_sc; } // Update KKT matrix with new rho_vec update_KKT_param2(s->KKT, s->rho_inv_vec, s->rho_inv, s->rhotoKKT, m); // Perform numerical factorization s->phase = PARDISO_NUMERIC; PARDISO (s->pt, &(s->maxfct), &(s->mnum), &(s->mtype), &(s->phase), &(s->nKKT), s->KKT->x, s->KKT_p, s->KKT_i, &(s->idum), &(s->nrhs), s->iparm, &(s->msglvl), &(s->fdum), &(s->fdum), &(s->error)); // Return exit flag return s->error; }
44c0523a0ec9ffbe52638f29cc7f66ed6de8302d
5ab69c8644a936a3d9dec1669a86c7369c911bf8
/os/net/app-layer/coap/coap-engine.h
814cb1e86b052a56fcb8c86e1812e969300ad149
[ "BSD-3-Clause" ]
permissive
contiki-ng/contiki-ng
393d36f68b98f5ee3544ea32502cf662ffb2fe9f
31fcaadf7a0dc8ceea07f438cd69db73174879e6
refs/heads/develop
2023-09-01T20:10:30.000765
2023-09-01T14:37:12
2023-09-01T14:37:12
91,191,972
1,242
788
BSD-3-Clause
2023-09-14T19:08:35
2017-05-13T17:37:59
C
UTF-8
C
false
false
7,751
h
coap-engine.h
/* * Copyright (c) 2013, Institute for Pervasive Computing, ETH Zurich * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * This file is part of the Contiki operating system. */ /** * \file * CoAP engine implementation. * \author * Matthias Kovatsch <kovatsch@inf.ethz.ch> */ /** * \addtogroup coap * @{ */ #ifndef COAP_ENGINE_H_ #define COAP_ENGINE_H_ typedef struct coap_resource_s coap_resource_t; typedef struct coap_periodic_resource_s coap_periodic_resource_t; #include "coap.h" #include "coap-timer.h" typedef enum { COAP_HANDLER_STATUS_CONTINUE, COAP_HANDLER_STATUS_PROCESSED } coap_handler_status_t; typedef coap_handler_status_t (* coap_handler_callback_t)(coap_message_t *request, coap_message_t *response, uint8_t *buffer, uint16_t buffer_size, int32_t *offset); typedef struct coap_handler coap_handler_t; struct coap_handler { coap_handler_t *next; coap_handler_callback_t handler; }; #define COAP_HANDLER(name, handler) \ coap_handler_t name = { NULL, handler } void coap_add_handler(coap_handler_t *handler); void coap_remove_handler(coap_handler_t *handler); void coap_engine_init(void); int coap_receive(const coap_endpoint_t *src, uint8_t *payload, uint16_t payload_length); coap_handler_status_t coap_call_handlers(coap_message_t *request, coap_message_t *response, uint8_t *buffer, uint16_t buffer_size, int32_t *offset); /*---------------------------------------------------------------------------*/ /* signatures of handler functions */ typedef void (* coap_resource_handler_t)(coap_message_t *request, coap_message_t *response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset); typedef void (* coap_resource_periodic_handler_t)(void); typedef void (* coap_resource_response_handler_t)(void *data, coap_message_t *response); typedef void (* coap_resource_trigger_handler_t)(void); /* data structure representing a resource in CoAP */ struct coap_resource_s { coap_resource_t *next; /* for LIST, points to next resource defined */ const char *url; /*handled URL */ coap_resource_flags_t flags; /* handled CoAP methods */ const char *attributes; /* link-format attributes */ coap_resource_handler_t get_handler; /* handler function */ coap_resource_handler_t post_handler; /* handler function */ coap_resource_handler_t put_handler; /* handler function */ coap_resource_handler_t delete_handler; /* handler function */ union { coap_periodic_resource_t *periodic; /* special data depending on flags */ coap_resource_trigger_handler_t trigger; coap_resource_trigger_handler_t resume; }; }; struct coap_periodic_resource_s { uint32_t period; coap_timer_t periodic_timer; const coap_resource_periodic_handler_t periodic_handler; }; /* * Macro to define a CoAP resource. * Resources are statically defined for the sake of efficiency and better memory management. */ #define RESOURCE(name, attributes, get_handler, post_handler, put_handler, delete_handler) \ coap_resource_t name = { NULL, NULL, NO_FLAGS, attributes, get_handler, post_handler, put_handler, delete_handler, { NULL } } #define PARENT_RESOURCE(name, attributes, get_handler, post_handler, put_handler, delete_handler) \ coap_resource_t name = { NULL, NULL, HAS_SUB_RESOURCES, attributes, get_handler, post_handler, put_handler, delete_handler, { NULL } } #define SEPARATE_RESOURCE(name, attributes, get_handler, post_handler, put_handler, delete_handler, resume_handler) \ coap_resource_t name = { NULL, NULL, IS_SEPARATE, attributes, get_handler, post_handler, put_handler, delete_handler, { .resume = resume_handler } } #define EVENT_RESOURCE(name, attributes, get_handler, post_handler, put_handler, delete_handler, event_handler) \ coap_resource_t name = { NULL, NULL, IS_OBSERVABLE, attributes, get_handler, post_handler, put_handler, delete_handler, { .trigger = event_handler } } /* * Macro to define a periodic resource. * The corresponding [name]_periodic_handler() function will be called every period. * For instance polling a sensor and publishing a changed value to subscribed clients would be done there. */ #define PERIODIC_RESOURCE(name, attributes, get_handler, post_handler, put_handler, delete_handler, period, periodic_handler) \ static coap_periodic_resource_t periodic_##name = { period, { 0 }, periodic_handler }; \ coap_resource_t name = { NULL, NULL, IS_OBSERVABLE | IS_PERIODIC, attributes, get_handler, post_handler, put_handler, delete_handler, { .periodic = &periodic_##name } } /*---------------------------------------------------------------------------*/ /** * * \brief Resources wanted to be accessible should be activated with the following code. * \param resource * A CoAP resource defined through the RESOURCE macros. * \param path * The local URI path where to provide the resource. */ void coap_activate_resource(coap_resource_t *resource, const char *path); /*---------------------------------------------------------------------------*/ /** * \brief Returns the first of the registered CoAP resources. * \return The first registered CoAP resource or NULL if none exists. */ coap_resource_t *coap_get_first_resource(void); /*---------------------------------------------------------------------------*/ /** * \brief Returns the next registered CoAP resource. * \return The next resource or NULL if no more exists. */ coap_resource_t *coap_get_next_resource(coap_resource_t *resource); /*---------------------------------------------------------------------------*/ #include "coap-transactions.h" #include "coap-observe.h" #include "coap-separate.h" #include "coap-observe-client.h" #include "coap-transport.h" #endif /* COAP_ENGINE_H_ */ /** @} */
c2580fc06755734e0b4fb74991f342d69c0d8faa
9de0cec678bc4a3bec2b4adabef9f39ff5b4afac
/PWGLF/NUCLEX/Hypernuclei/Hyp2Body/AddTask_Helium3Pi.C
39dc93490fd780d046cf39dfa061a9cf1ba12f4c
[]
permissive
alisw/AliPhysics
91bf1bd01ab2af656a25ff10b25e618a63667d3e
5df28b2b415e78e81273b0d9bf5c1b99feda3348
refs/heads/master
2023-08-31T20:41:44.927176
2023-08-31T14:51:12
2023-08-31T14:51:12
61,661,378
129
1,150
BSD-3-Clause
2023-09-14T18:48:45
2016-06-21T19:31:29
C++
UTF-8
C
false
false
2,757
c
AddTask_Helium3Pi.C
#if !defined(__CINT__) || defined(__MAKECINT__) #include <Rtypes.h> #include <TString.h> #include "AliAnalysisTaskNucleiYield.h" #include "AliAnalysisManager.h" #include "AliAnalysisDataContainer.h" #include "AliPID.h" #endif AliAnalysisTask *AddTask_Helium3Pi(TString name="name", Short_t collidingSystems = 1, TString analysisType = "ESD", TString dataType = "PbPb", Int_t year = 2011, Float_t Vzmax = 10, Bool_t applyFlatten = kTRUE, Bool_t fill3hetree = kTRUE, Bool_t doFlow = kTRUE ){ ::Info("AddTaskHelium3Pi","Adding a new task with this settings analysisType = %s",analysisType); //get the current analysis manager AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); if (!mgr) { ::Error("AddTaskHelium3Pi", "No analysis manager found."); return 0; } // Check the analysis type using the event handlers connected to the analysis manager. //============================================================================== if (!mgr->GetInputEventHandler()) { ::Error("AddTaskHelium3Pi", "This task requires an input event handler"); return NULL; } TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" if(type.Contains("AOD")){ ::Error("AddTaskHypertriton3", "This task requires to run on ESD"); return NULL; } AliAnalysisTaskHelium3Pi *task = new AliAnalysisTaskHelium3Pi(name.Data()); task->SetCollidingSystems(collidingSystems); task->SetAnalysisType(analysisType); task->SetDataType(dataType); task->SetYear(year); task->SetVzMax(Vzmax); task->SetApplyFlatten(applyFlatten); task->SetFill3Htree(fill3hetree); task->ComputeFlow(doFlow); mgr->AddTask(task); //================================================ // data containers //================================================ // find input container AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); TString outputFileName = AliAnalysisManager::GetCommonFileName(); AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("clisthist", TList::Class(), AliAnalysisManager::kOutputContainer, outputFileName); AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("treeHyp", TTree::Class(),AliAnalysisManager::kOutputContainer, outputFileName); AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("treeNuclei", TTree::Class(),AliAnalysisManager::kOutputContainer, outputFileName); // connect containers mgr->ConnectInput (task, 0, cinput ); mgr->ConnectOutput (task, 1, coutput1); mgr->ConnectOutput (task, 2, coutput2); mgr->ConnectOutput (task, 3, coutput3); return task; }
533e37635df36985dfd4324d9876bf82b0e6d12f
f7dc806f341ef5dbb0e11252a4693003a66853d5
/thirdparty/freetype/src/base/ftdbgmem.c
8fab50dd017e64a3460e60493f6662fd03d6b6a1
[ "LicenseRef-scancode-free-unknown", "MIT", "CC-BY-4.0", "OFL-1.1", "Bison-exception-2.2", "CC0-1.0", "LicenseRef-scancode-nvidia-2002", "LicenseRef-scancode-other-permissive", "GPL-3.0-only", "LicenseRef-scancode-unknown-license-reference", "Unlicense", "BSL-1.0", "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unicode", "BSD-2-Clause", "FTL", "GPL-3.0-or-later", "Bitstream-Vera", "Zlib", "MPL-2.0", "MIT-Modern-Variant", "JSON", "Libpng", "GPL-2.0-only", "LicenseRef-scancode-unknown", "GPL-1.0-or-later", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
godotengine/godot
8a2419750f4851d1426a8f3bcb52cac5c86f23c2
970be7afdc111ccc7459d7ef3560de70e6d08c80
refs/heads/master
2023-08-21T14:37:00.262883
2023-08-21T06:26:15
2023-08-21T06:26:15
15,634,981
68,852
18,388
MIT
2023-09-14T21:42:16
2014-01-04T16:05:36
C++
UTF-8
C
false
false
23,926
c
ftdbgmem.c
/**************************************************************************** * * ftdbgmem.c * * Memory debugger (body). * * Copyright (C) 2001-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, * modified, and distributed under the terms of the FreeType project * license, LICENSE.TXT. By continuing to use, modify, or distribute * this file you indicate that you have read the license and * understand and accept it fully. * */ #include <ft2build.h> #include FT_CONFIG_CONFIG_H #include <freetype/internal/ftdebug.h> #include <freetype/internal/ftmemory.h> #include <freetype/ftsystem.h> #include <freetype/fterrors.h> #include <freetype/fttypes.h> #ifdef FT_DEBUG_MEMORY #define KEEPALIVE /* `Keep alive' means that freed blocks aren't released * to the heap. This is useful to detect double-frees * or weird heap corruption, but it uses large amounts of * memory, however. */ #include FT_CONFIG_STANDARD_LIBRARY_H FT_BASE_DEF( const char* ) ft_debug_file_ = NULL; FT_BASE_DEF( long ) ft_debug_lineno_ = 0; extern void FT_DumpMemory( FT_Memory memory ); typedef struct FT_MemSourceRec_* FT_MemSource; typedef struct FT_MemNodeRec_* FT_MemNode; typedef struct FT_MemTableRec_* FT_MemTable; #define FT_MEM_VAL( addr ) ( (FT_PtrDist)(FT_Pointer)( addr ) ) /* * This structure holds statistics for a single allocation/release * site. This is useful to know where memory operations happen the * most. */ typedef struct FT_MemSourceRec_ { const char* file_name; long line_no; FT_Long cur_blocks; /* current number of allocated blocks */ FT_Long max_blocks; /* max. number of allocated blocks */ FT_Long all_blocks; /* total number of blocks allocated */ FT_Long cur_size; /* current cumulative allocated size */ FT_Long max_size; /* maximum cumulative allocated size */ FT_Long all_size; /* total cumulative allocated size */ FT_Long cur_max; /* current maximum allocated size */ FT_UInt32 hash; FT_MemSource link; } FT_MemSourceRec; /* * We don't need a resizable array for the memory sources because * their number is pretty limited within FreeType. */ #define FT_MEM_SOURCE_BUCKETS 128 /* * This structure holds information related to a single allocated * memory block. If KEEPALIVE is defined, blocks that are freed by * FreeType are never released to the system. Instead, their `size' * field is set to `-size'. This is mainly useful to detect double * frees, at the price of a large memory footprint during execution. */ typedef struct FT_MemNodeRec_ { FT_Byte* address; FT_Long size; /* < 0 if the block was freed */ FT_MemSource source; #ifdef KEEPALIVE const char* free_file_name; FT_Long free_line_no; #endif FT_MemNode link; } FT_MemNodeRec; /* * The global structure, containing compound statistics and all hash * tables. */ typedef struct FT_MemTableRec_ { FT_Long size; FT_Long nodes; FT_MemNode* buckets; FT_Long alloc_total; FT_Long alloc_current; FT_Long alloc_max; FT_Long alloc_count; FT_Bool bound_total; FT_Long alloc_total_max; FT_Bool bound_count; FT_Long alloc_count_max; FT_MemSource sources[FT_MEM_SOURCE_BUCKETS]; FT_Bool keep_alive; FT_Memory memory; FT_Pointer memory_user; FT_Alloc_Func alloc; FT_Free_Func free; FT_Realloc_Func realloc; } FT_MemTableRec; #define FT_MEM_SIZE_MIN 7 #define FT_MEM_SIZE_MAX 13845163 #define FT_FILENAME( x ) ( (x) ? (x) : "unknown file" ) /* * Prime numbers are ugly to handle. It would be better to implement * L-Hashing, which is 10% faster and doesn't require divisions. */ static const FT_Int ft_mem_primes[] = { 7, 11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237, 1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627, 47431, 71143, 106721, 160073, 240101, 360163, 540217, 810343, 1215497, 1823231, 2734867, 4102283, 6153409, 9230113, 13845163, }; static FT_Long ft_mem_closest_prime( FT_Long num ) { size_t i; for ( i = 0; i < sizeof ( ft_mem_primes ) / sizeof ( ft_mem_primes[0] ); i++ ) if ( ft_mem_primes[i] > num ) return ft_mem_primes[i]; return FT_MEM_SIZE_MAX; } static void ft_mem_debug_panic( const char* fmt, ... ) { va_list ap; printf( "FreeType.Debug: " ); va_start( ap, fmt ); vprintf( fmt, ap ); va_end( ap ); printf( "\n" ); exit( EXIT_FAILURE ); } static FT_Pointer ft_mem_table_alloc( FT_MemTable table, FT_Long size ) { FT_Memory memory = table->memory; FT_Pointer block; memory->user = table->memory_user; block = table->alloc( memory, size ); memory->user = table; return block; } static void ft_mem_table_free( FT_MemTable table, FT_Pointer block ) { FT_Memory memory = table->memory; memory->user = table->memory_user; table->free( memory, block ); memory->user = table; } static void ft_mem_table_resize( FT_MemTable table ) { FT_Long new_size; new_size = ft_mem_closest_prime( table->nodes ); if ( new_size != table->size ) { FT_MemNode* new_buckets; FT_Long i; new_buckets = (FT_MemNode *) ft_mem_table_alloc( table, new_size * (FT_Long)sizeof ( FT_MemNode ) ); if ( !new_buckets ) return; FT_ARRAY_ZERO( new_buckets, new_size ); for ( i = 0; i < table->size; i++ ) { FT_MemNode node, next, *pnode; FT_PtrDist hash; node = table->buckets[i]; while ( node ) { next = node->link; hash = FT_MEM_VAL( node->address ) % (FT_PtrDist)new_size; pnode = new_buckets + hash; node->link = pnode[0]; pnode[0] = node; node = next; } } if ( table->buckets ) ft_mem_table_free( table, table->buckets ); table->buckets = new_buckets; table->size = new_size; } } static void ft_mem_table_destroy( FT_MemTable table ) { FT_Long i; FT_Long leak_count = 0; FT_Long leaks = 0; /* remove all blocks from the table, revealing leaked ones */ for ( i = 0; i < table->size; i++ ) { FT_MemNode *pnode = table->buckets + i, next, node = *pnode; while ( node ) { next = node->link; node->link = NULL; if ( node->size > 0 ) { printf( "leaked memory block at address %p, size %8ld in (%s:%ld)\n", (void*)node->address, node->size, FT_FILENAME( node->source->file_name ), node->source->line_no ); leak_count++; leaks += node->size; ft_mem_table_free( table, node->address ); } node->address = NULL; node->size = 0; ft_mem_table_free( table, node ); node = next; } table->buckets[i] = NULL; } ft_mem_table_free( table, table->buckets ); table->buckets = NULL; table->size = 0; table->nodes = 0; /* remove all sources */ for ( i = 0; i < FT_MEM_SOURCE_BUCKETS; i++ ) { FT_MemSource source, next; for ( source = table->sources[i]; source != NULL; source = next ) { next = source->link; ft_mem_table_free( table, source ); } table->sources[i] = NULL; } printf( "FreeType: total memory allocations = %ld\n", table->alloc_total ); printf( "FreeType: maximum memory footprint = %ld\n", table->alloc_max ); if ( leak_count > 0 ) ft_mem_debug_panic( "FreeType: %ld bytes of memory leaked in %ld blocks\n", leaks, leak_count ); printf( "FreeType: no memory leaks detected\n" ); } static FT_MemNode* ft_mem_table_get_nodep( FT_MemTable table, FT_Byte* address ) { FT_PtrDist hash; FT_MemNode *pnode, node; hash = FT_MEM_VAL( address ); pnode = table->buckets + ( hash % (FT_PtrDist)table->size ); for (;;) { node = pnode[0]; if ( !node ) break; if ( node->address == address ) break; pnode = &node->link; } return pnode; } static FT_MemSource ft_mem_table_get_source( FT_MemTable table ) { FT_UInt32 hash; FT_MemSource node, *pnode; /* cast to FT_PtrDist first since void* can be larger */ /* than FT_UInt32 and GCC 4.1.1 emits a warning */ hash = (FT_UInt32)(FT_PtrDist)(void*)ft_debug_file_ + (FT_UInt32)( 5 * ft_debug_lineno_ ); pnode = &table->sources[hash % FT_MEM_SOURCE_BUCKETS]; for (;;) { node = *pnode; if ( !node ) break; if ( node->file_name == ft_debug_file_ && node->line_no == ft_debug_lineno_ ) goto Exit; pnode = &node->link; } node = (FT_MemSource)ft_mem_table_alloc( table, sizeof ( *node ) ); if ( !node ) ft_mem_debug_panic( "not enough memory to perform memory debugging\n" ); node->file_name = ft_debug_file_; node->line_no = ft_debug_lineno_; node->cur_blocks = 0; node->max_blocks = 0; node->all_blocks = 0; node->cur_size = 0; node->max_size = 0; node->all_size = 0; node->cur_max = 0; node->link = NULL; node->hash = hash; *pnode = node; Exit: return node; } static void ft_mem_table_set( FT_MemTable table, FT_Byte* address, FT_Long size, FT_Long delta ) { FT_MemNode *pnode, node; if ( table ) { FT_MemSource source; pnode = ft_mem_table_get_nodep( table, address ); node = *pnode; if ( node ) { if ( node->size < 0 ) { /* This block was already freed. Our memory is now completely */ /* corrupted! */ /* This can only happen in keep-alive mode. */ ft_mem_debug_panic( "memory heap corrupted (allocating freed block)" ); } else { /* This block was already allocated. This means that our memory */ /* is also corrupted! */ ft_mem_debug_panic( "memory heap corrupted (re-allocating allocated block at" " %p, of size %ld)\n" "org=%s:%d new=%s:%d\n", node->address, node->size, FT_FILENAME( node->source->file_name ), node->source->line_no, FT_FILENAME( ft_debug_file_ ), ft_debug_lineno_ ); } } /* we need to create a new node in this table */ node = (FT_MemNode)ft_mem_table_alloc( table, sizeof ( *node ) ); if ( !node ) ft_mem_debug_panic( "not enough memory to run memory tests" ); node->address = address; node->size = size; node->source = source = ft_mem_table_get_source( table ); if ( delta == 0 ) { /* this is an allocation */ source->all_blocks++; source->cur_blocks++; if ( source->cur_blocks > source->max_blocks ) source->max_blocks = source->cur_blocks; } if ( size > source->cur_max ) source->cur_max = size; if ( delta != 0 ) { /* we are growing or shrinking a reallocated block */ source->cur_size += delta; table->alloc_current += delta; } else { /* we are allocating a new block */ source->cur_size += size; table->alloc_current += size; } source->all_size += size; if ( source->cur_size > source->max_size ) source->max_size = source->cur_size; node->free_file_name = NULL; node->free_line_no = 0; node->link = pnode[0]; pnode[0] = node; table->nodes++; table->alloc_total += size; if ( table->alloc_current > table->alloc_max ) table->alloc_max = table->alloc_current; if ( table->nodes * 3 < table->size || table->size * 3 < table->nodes ) ft_mem_table_resize( table ); } } static void ft_mem_table_remove( FT_MemTable table, FT_Byte* address, FT_Long delta ) { if ( table ) { FT_MemNode *pnode, node; pnode = ft_mem_table_get_nodep( table, address ); node = *pnode; if ( node ) { FT_MemSource source; if ( node->size < 0 ) ft_mem_debug_panic( "freeing memory block at %p more than once\n" " at (%s:%ld)!\n" " Block was allocated at (%s:%ld)\n" " and released at (%s:%ld).", address, FT_FILENAME( ft_debug_file_ ), ft_debug_lineno_, FT_FILENAME( node->source->file_name ), node->source->line_no, FT_FILENAME( node->free_file_name ), node->free_line_no ); /* scramble the node's content for additional safety */ FT_MEM_SET( address, 0xF3, node->size ); if ( delta == 0 ) { source = node->source; source->cur_blocks--; source->cur_size -= node->size; table->alloc_current -= node->size; } if ( table->keep_alive ) { /* we simply invert the node's size to indicate that the node */ /* was freed. */ node->size = -node->size; node->free_file_name = ft_debug_file_; node->free_line_no = ft_debug_lineno_; } else { table->nodes--; *pnode = node->link; node->size = 0; node->source = NULL; ft_mem_table_free( table, node ); if ( table->nodes * 3 < table->size || table->size * 3 < table->nodes ) ft_mem_table_resize( table ); } } else ft_mem_debug_panic( "trying to free unknown block at %p in (%s:%ld)\n", address, FT_FILENAME( ft_debug_file_ ), ft_debug_lineno_ ); } } static FT_Pointer ft_mem_debug_alloc( FT_Memory memory, FT_Long size ) { FT_MemTable table = (FT_MemTable)memory->user; FT_Byte* block; if ( size <= 0 ) ft_mem_debug_panic( "negative block size allocation (%ld)", size ); /* return NULL if the maximum number of allocations was reached */ if ( table->bound_count && table->alloc_count >= table->alloc_count_max ) return NULL; /* return NULL if this allocation would overflow the maximum heap size */ if ( table->bound_total && table->alloc_total_max - table->alloc_current > size ) return NULL; block = (FT_Byte *)ft_mem_table_alloc( table, size ); if ( block ) { ft_mem_table_set( table, block, size, 0 ); table->alloc_count++; } ft_debug_file_ = "<unknown>"; ft_debug_lineno_ = 0; return (FT_Pointer)block; } static void ft_mem_debug_free( FT_Memory memory, FT_Pointer block ) { FT_MemTable table = (FT_MemTable)memory->user; if ( !block ) ft_mem_debug_panic( "trying to free NULL in (%s:%ld)", FT_FILENAME( ft_debug_file_ ), ft_debug_lineno_ ); ft_mem_table_remove( table, (FT_Byte*)block, 0 ); if ( !table->keep_alive ) ft_mem_table_free( table, block ); table->alloc_count--; ft_debug_file_ = "<unknown>"; ft_debug_lineno_ = 0; } static FT_Pointer ft_mem_debug_realloc( FT_Memory memory, FT_Long cur_size, FT_Long new_size, FT_Pointer block ) { FT_MemTable table = (FT_MemTable)memory->user; FT_MemNode node, *pnode; FT_Pointer new_block; FT_Long delta; const char* file_name = FT_FILENAME( ft_debug_file_ ); FT_Long line_no = ft_debug_lineno_; /* unlikely, but possible */ if ( new_size == cur_size ) return block; /* the following is valid according to ANSI C */ #if 0 if ( !block || !cur_size ) ft_mem_debug_panic( "trying to reallocate NULL in (%s:%ld)", file_name, line_no ); #endif /* while the following is allowed in ANSI C also, we abort since */ /* such case should be handled by FreeType. */ if ( new_size <= 0 ) ft_mem_debug_panic( "trying to reallocate %p to size 0 (current is %ld) in (%s:%ld)", block, cur_size, file_name, line_no ); /* check `cur_size' value */ pnode = ft_mem_table_get_nodep( table, (FT_Byte*)block ); node = *pnode; if ( !node ) ft_mem_debug_panic( "trying to reallocate unknown block at %p in (%s:%ld)", block, file_name, line_no ); if ( node->size <= 0 ) ft_mem_debug_panic( "trying to reallocate freed block at %p in (%s:%ld)", block, file_name, line_no ); if ( node->size != cur_size ) ft_mem_debug_panic( "invalid ft_realloc request for %p. cur_size is " "%ld instead of %ld in (%s:%ld)", block, cur_size, node->size, file_name, line_no ); /* return NULL if the maximum number of allocations was reached */ if ( table->bound_count && table->alloc_count >= table->alloc_count_max ) return NULL; delta = new_size - cur_size; /* return NULL if this allocation would overflow the maximum heap size */ if ( delta > 0 && table->bound_total && table->alloc_current + delta > table->alloc_total_max ) return NULL; new_block = (FT_Pointer)ft_mem_table_alloc( table, new_size ); if ( !new_block ) return NULL; ft_mem_table_set( table, (FT_Byte*)new_block, new_size, delta ); ft_memcpy( new_block, block, cur_size < new_size ? (size_t)cur_size : (size_t)new_size ); ft_mem_table_remove( table, (FT_Byte*)block, delta ); ft_debug_file_ = "<unknown>"; ft_debug_lineno_ = 0; if ( !table->keep_alive ) ft_mem_table_free( table, block ); return new_block; } extern void ft_mem_debug_init( FT_Memory memory ) { FT_MemTable table; if ( !ft_getenv( "FT2_DEBUG_MEMORY" ) ) return; table = (FT_MemTable)memory->alloc( memory, sizeof ( *table ) ); if ( table ) { FT_ZERO( table ); table->memory = memory; table->memory_user = memory->user; table->alloc = memory->alloc; table->realloc = memory->realloc; table->free = memory->free; ft_mem_table_resize( table ); if ( table->size ) { const char* p; memory->user = table; memory->alloc = ft_mem_debug_alloc; memory->realloc = ft_mem_debug_realloc; memory->free = ft_mem_debug_free; p = ft_getenv( "FT2_ALLOC_TOTAL_MAX" ); if ( p ) { FT_Long total_max = ft_strtol( p, NULL, 10 ); if ( total_max > 0 ) { table->bound_total = 1; table->alloc_total_max = total_max; } } p = ft_getenv( "FT2_ALLOC_COUNT_MAX" ); if ( p ) { FT_Long total_count = ft_strtol( p, NULL, 10 ); if ( total_count > 0 ) { table->bound_count = 1; table->alloc_count_max = total_count; } } p = ft_getenv( "FT2_KEEP_ALIVE" ); if ( p ) { FT_Long keep_alive = ft_strtol( p, NULL, 10 ); if ( keep_alive > 0 ) table->keep_alive = 1; } } else memory->free( memory, table ); } } extern void ft_mem_debug_done( FT_Memory memory ) { if ( memory->free == ft_mem_debug_free ) { FT_MemTable table = (FT_MemTable)memory->user; FT_DumpMemory( memory ); ft_mem_table_destroy( table ); memory->free = table->free; memory->realloc = table->realloc; memory->alloc = table->alloc; memory->user = table->memory_user; memory->free( memory, table ); } } FT_COMPARE_DEF( int ) ft_mem_source_compare( const void* p1, const void* p2 ) { FT_MemSource s1 = *(FT_MemSource*)p1; FT_MemSource s2 = *(FT_MemSource*)p2; if ( s2->max_size > s1->max_size ) return 1; else if ( s2->max_size < s1->max_size ) return -1; else return 0; } extern void FT_DumpMemory( FT_Memory memory ) { if ( memory->free == ft_mem_debug_free ) { FT_MemTable table = (FT_MemTable)memory->user; FT_MemSource* bucket = table->sources; FT_MemSource* limit = bucket + FT_MEM_SOURCE_BUCKETS; FT_MemSource* sources; FT_Int nn, count; const char* fmt; count = 0; for ( ; bucket < limit; bucket++ ) { FT_MemSource source = *bucket; for ( ; source; source = source->link ) count++; } sources = (FT_MemSource*) ft_mem_table_alloc( table, count * (FT_Long)sizeof ( *sources ) ); count = 0; for ( bucket = table->sources; bucket < limit; bucket++ ) { FT_MemSource source = *bucket; for ( ; source; source = source->link ) sources[count++] = source; } ft_qsort( sources, (size_t)count, sizeof ( *sources ), ft_mem_source_compare ); printf( "FreeType Memory Dump: " "current=%ld max=%ld total=%ld count=%ld\n", table->alloc_current, table->alloc_max, table->alloc_total, table->alloc_count ); printf( " block block sizes sizes sizes source\n" ); printf( " count high sum highsum max location\n" ); printf( "-------------------------------------------------\n" ); fmt = "%6ld %6ld %8ld %8ld %8ld %s:%d\n"; for ( nn = 0; nn < count; nn++ ) { FT_MemSource source = sources[nn]; printf( fmt, source->cur_blocks, source->max_blocks, source->cur_size, source->max_size, source->cur_max, FT_FILENAME( source->file_name ), source->line_no ); } printf( "------------------------------------------------\n" ); ft_mem_table_free( table, sources ); } } #else /* !FT_DEBUG_MEMORY */ /* ANSI C doesn't like empty source files */ typedef int debug_mem_dummy_; #endif /* !FT_DEBUG_MEMORY */ /* END */
b9068a1d2013ba367c4fedcbcd911a2658d4cc4a
55540f3e86f1d5d86ef6b5d295a63518e274efe3
/components/network/ble/blestack/src/host/att_internal.h
7f8e089c15f6ea7a979d6f38d784630ba98b6860
[ "Apache-2.0" ]
permissive
bouffalolab/bl_iot_sdk
bc5eaf036b70f8c65dd389439062b169f8d09daa
b90664de0bd4c1897a9f1f5d9e360a9631d38b34
refs/heads/master
2023-08-31T03:38:03.369853
2023-08-16T08:50:33
2023-08-18T09:13:27
307,347,250
244
101
Apache-2.0
2023-08-28T06:29:02
2020-10-26T11:16:30
C
UTF-8
C
false
false
5,454
h
att_internal.h
/* att_internal.h - Attribute protocol handling */ /* * Copyright (c) 2015-2016 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #define BT_ATT_DEFAULT_LE_MTU 23 #if BT_L2CAP_RX_MTU < CONFIG_BT_L2CAP_TX_MTU #define BT_ATT_MTU BT_L2CAP_RX_MTU #else #define BT_ATT_MTU CONFIG_BT_L2CAP_TX_MTU #endif struct bt_att_hdr { u8_t code; } __packed; #define BT_ATT_OP_ERROR_RSP 0x01 struct bt_att_error_rsp { u8_t request; u16_t handle; u8_t error; } __packed; #define BT_ATT_OP_MTU_REQ 0x02 struct bt_att_exchange_mtu_req { u16_t mtu; } __packed; #define BT_ATT_OP_MTU_RSP 0x03 struct bt_att_exchange_mtu_rsp { u16_t mtu; } __packed; /* Find Information Request */ #define BT_ATT_OP_FIND_INFO_REQ 0x04 struct bt_att_find_info_req { u16_t start_handle; u16_t end_handle; } __packed; /* Format field values for BT_ATT_OP_FIND_INFO_RSP */ #define BT_ATT_INFO_16 0x01 #define BT_ATT_INFO_128 0x02 struct bt_att_info_16 { u16_t handle; u16_t uuid; } __packed; struct bt_att_info_128 { u16_t handle; u8_t uuid[16]; } __packed; /* Find Information Response */ #define BT_ATT_OP_FIND_INFO_RSP 0x05 struct bt_att_find_info_rsp { u8_t format; u8_t info[0]; } __packed; /* Find By Type Value Request */ #define BT_ATT_OP_FIND_TYPE_REQ 0x06 struct bt_att_find_type_req { u16_t start_handle; u16_t end_handle; u16_t type; u8_t value[0]; } __packed; struct bt_att_handle_group { u16_t start_handle; u16_t end_handle; } __packed; /* Find By Type Value Response */ #define BT_ATT_OP_FIND_TYPE_RSP 0x07 struct bt_att_find_type_rsp { struct bt_att_handle_group list[0]; } __packed; /* Read By Type Request */ #define BT_ATT_OP_READ_TYPE_REQ 0x08 struct bt_att_read_type_req { u16_t start_handle; u16_t end_handle; u8_t uuid[0]; } __packed; struct bt_att_data { u16_t handle; u8_t value[0]; } __packed; /* Read By Type Response */ #define BT_ATT_OP_READ_TYPE_RSP 0x09 struct bt_att_read_type_rsp { u8_t len; struct bt_att_data data[0]; } __packed; /* Read Request */ #define BT_ATT_OP_READ_REQ 0x0a struct bt_att_read_req { u16_t handle; } __packed; /* Read Response */ #define BT_ATT_OP_READ_RSP 0x0b struct bt_att_read_rsp { u8_t value[0]; } __packed; /* Read Blob Request */ #define BT_ATT_OP_READ_BLOB_REQ 0x0c struct bt_att_read_blob_req { u16_t handle; u16_t offset; } __packed; /* Read Blob Response */ #define BT_ATT_OP_READ_BLOB_RSP 0x0d struct bt_att_read_blob_rsp { u8_t value[0]; } __packed; /* Read Multiple Request */ #define BT_ATT_READ_MULT_MIN_LEN_REQ 0x04 #define BT_ATT_OP_READ_MULT_REQ 0x0e struct bt_att_read_mult_req { u16_t handles[0]; } __packed; /* Read Multiple Respose */ #define BT_ATT_OP_READ_MULT_RSP 0x0f struct bt_att_read_mult_rsp { u8_t value[0]; } __packed; /* Read by Group Type Request */ #define BT_ATT_OP_READ_GROUP_REQ 0x10 struct bt_att_read_group_req { u16_t start_handle; u16_t end_handle; u8_t uuid[0]; } __packed; struct bt_att_group_data { u16_t start_handle; u16_t end_handle; u8_t value[0]; } __packed; /* Read by Group Type Response */ #define BT_ATT_OP_READ_GROUP_RSP 0x11 struct bt_att_read_group_rsp { u8_t len; struct bt_att_group_data data[0]; } __packed; /* Write Request */ #define BT_ATT_OP_WRITE_REQ 0x12 struct bt_att_write_req { u16_t handle; u8_t value[0]; } __packed; /* Write Response */ #define BT_ATT_OP_WRITE_RSP 0x13 /* Prepare Write Request */ #define BT_ATT_OP_PREPARE_WRITE_REQ 0x16 struct bt_att_prepare_write_req { u16_t handle; u16_t offset; u8_t value[0]; } __packed; /* Prepare Write Respond */ #define BT_ATT_OP_PREPARE_WRITE_RSP 0x17 struct bt_att_prepare_write_rsp { u16_t handle; u16_t offset; u8_t value[0]; } __packed; /* Execute Write Request */ #define BT_ATT_FLAG_CANCEL 0x00 #define BT_ATT_FLAG_EXEC 0x01 #define BT_ATT_OP_EXEC_WRITE_REQ 0x18 struct bt_att_exec_write_req { u8_t flags; } __packed; /* Execute Write Response */ #define BT_ATT_OP_EXEC_WRITE_RSP 0x19 /* Handle Value Notification */ #define BT_ATT_OP_NOTIFY 0x1b struct bt_att_notify { u16_t handle; u8_t value[0]; } __packed; /* Handle Value Indication */ #define BT_ATT_OP_INDICATE 0x1d struct bt_att_indicate { u16_t handle; u8_t value[0]; } __packed; /* Handle Value Confirm */ #define BT_ATT_OP_CONFIRM 0x1e struct bt_att_signature { u8_t value[12]; } __packed; /* Write Command */ #define BT_ATT_OP_WRITE_CMD 0x52 struct bt_att_write_cmd { u16_t handle; u8_t value[0]; } __packed; /* Signed Write Command */ #define BT_ATT_OP_SIGNED_WRITE_CMD 0xd2 struct bt_att_signed_write_cmd { u16_t handle; u8_t value[0]; } __packed; void att_pdu_sent(struct bt_conn *conn, void *user_data); void att_cfm_sent(struct bt_conn *conn, void *user_data); void att_rsp_sent(struct bt_conn *conn, void *user_data); void att_req_sent(struct bt_conn *conn, void *user_data); void bt_att_init(void); u16_t bt_att_get_mtu(struct bt_conn *conn); #if defined(CONFIG_BLE_AT_CMD) void set_mtu_size(u16_t size); #endif struct net_buf *bt_att_create_pdu(struct bt_conn *conn, u8_t op, size_t len); /* Send ATT PDU over a connection */ int bt_att_send(struct bt_conn *conn, struct net_buf *buf, bt_conn_tx_cb_t cb, void *user_data); /* Send ATT Request over a connection */ int bt_att_req_send(struct bt_conn *conn, struct bt_att_req *req); /* Cancel ATT request */ void bt_att_req_cancel(struct bt_conn *conn, struct bt_att_req *req);
b233f32da452b60bf9b7d313f17740a6678b3d45
76f7459a09acb9be2d52407132f5ff8955627da2
/sandbox/power10/p10_testsuite/correctness.c
a3d094ecd485bad776a81e4c1d02975c6b2e5f6f
[ "BSD-3-Clause" ]
permissive
flame/blis
448bc0ad139b726188129c5627c304274b41c3c1
6dcf7666eff14348e82fbc2750be4b199321e1b9
refs/heads/master
2023-09-01T14:56:11.920485
2023-08-27T19:18:57
2023-08-27T19:18:57
16,143,904
1,696
361
NOASSERTION
2023-08-27T19:18:58
2014-01-22T15:58:24
C
UTF-8
C
false
false
8,798
c
correctness.c
/* This program is designed to test the correctness of the POWER10 GEMM kernels in `blis/sandbox/power10`. By default, the correctness of the kernels is determined by measuring how close the return value of the following function is to zero for square matrix sizes. F(A, B, C_orig, C_ans, alpha, beta, t) = normf( (C_ans * t) - ((alpha * A * B + beta * C_orig) * t) ) The function above can only be used to measure correctness if A, B, C_orig, and t have been randomized and normalized. The correctness is reported by printing the function return value along with the matrices' sizes. */ #include "blis.h" #include "cast_funcs.h" #include "correctness.h" #include "../bli_sandbox.h" #include "common.h" #include <stdio.h> // print kernel name const char* get_kernel_name(int kernel_id) { switch (kernel_id) { case FLOAT16 : return "bli_shgemm"; case BFLOAT16: return "bli_sbgemm"; case INT16 : return "bli_i16gemm"; case INT8 : return "bli_i8gemm"; case INT4 : return "bli_i4gemm"; default: printf("INCORRECT KERNEL ID\n"); exit(-1); } } // normalize the vector using the forbenious norm void normalize_vec(float *t, int n) { // normalize t float norm_factor; bli_snormfv(n, t, 1, &norm_factor); // round up to closest power of 2 norm_factor = 1 / (pow( 2.0, ceil( log2( norm_factor ) ) )); bli_sscalv(BLIS_NO_CONJUGATE, n, &norm_factor, t, 1); } // Pre-conditions: // - a is randomized. // - b is randomized. // - c_orig is randomized. // Note: // - alpha and beta should have non-zero imaginary components in the // complex cases in order to more fully exercise the implementation. // // Under these conditions, we assume that the implementation for // // C := beta * C_orig + alpha * transa(A) * transb(B) // // is functioning correctly if // // normfv( v - z ) // // is negligible, where // // v = C * t // z = ( beta * C_orig + alpha * transa(A) * transb(B) ) * t // = beta * C_orig * t + alpha * transa(A) * transb(B) * t // = beta * C_orig * t + alpha * transa(A) * w // = beta * C_orig * t + z float get_resid( int m, int n, int k, float *a, int rsa, int csa, float *b, int rsb, int csb, float *c, int rsc, int csc, float *c_orig, float *alpha, float *beta ) { float t[n], v[m], w[k], z[m]; float one = 1.0, zero = 0.0; bli_srandv(n, t, 1); // normalize so that the values are at the same precision of the input values normalize_vec(t, n); // v = C * t bli_sgemv( BLIS_NO_TRANSPOSE, BLIS_NO_CONJUGATE, m, n, &one, c, rsc, csc, t, 1, &zero, v, 1 ); // w = B * t bli_sgemv( BLIS_NO_TRANSPOSE, BLIS_NO_CONJUGATE, k, n, &one, b, rsb, csb, t, 1, &zero, w, 1 ); // z = alpha * A * w bli_sgemv( BLIS_NO_TRANSPOSE, BLIS_NO_CONJUGATE, m, k, alpha, a, rsa, csa, w, 1, &zero, z, 1 ); // z += beta * C_orig * t bli_sgemv( BLIS_NO_TRANSPOSE, BLIS_NO_CONJUGATE, m, n, beta, c_orig, rsc, csc, t, 1, &one, z, 1 ); // v = v - z bli_ssubv ( BLIS_NO_CONJUGATE, m, z, 1, v, 1 ); // norm = normfv(v) float norm; bli_snormfv ( m, v, 1, &norm ); return norm; } // test to see if the result from a BLIS GEMM kernel is correct for a given m x n x k mat-mul // assumes the matrices are of type float // assumes the matrices were randomized and normalized void correctness_checker( int m, int n, int k, float *a, int rsa, int csa, float *b, int rsb, int csb, float *c_orig, int rsc, int csc, float *c_ans, float alpha, float beta ) { double start, end; start = bli_clock(); float resid = get_resid ( m, n, k, a, rsa, csa, b, rsb, csb, c_ans, rsc, csc, c_orig, &alpha, &beta ); end = bli_clock(); printf("%d, %d, %d, %8.4le\n", m,n,k, resid); } // create all the correctness checking functions for each kernel GEN_FP_COR_KERNEL(sb, bli_sbgemm, bfloat16, cast_f32_to_bf16m, cast_bf16_to_f32m); GEN_FP_COR_KERNEL(sh, bli_shgemm, float16, cast_f32_to_f16m, cast_f16_to_f32m); GEN_I_COR_KERNEL(i16, bli_i16gemm, int16_t, cast_f32_to_i16m, cast_i16_to_f32m); GEN_I_COR_KERNEL(i8, bli_i8gemm, int8_t, cast_f32_to_i8m, cast_i8_to_f32m); // correctness template for int types void i4correctness_kernel (int m, int n, int k) { if(n%2 != 0) { printf("int4 can't handle odd sizes in the data-order dimension"); exit(-1); } int rsa = k, csa = 1, rsb = n, csb = 1, rsc = n, csc = 1; nibbles *a, *b; int32_t *c_ans, *c_orig, alpha, beta; float *a_float, *b_float, *c_ans_float, *c_orig_float; /* buffers that will be passed into the kernel */ // int4 buffers only need half the space to store all the elements a = (nibbles *) malloc (m * (k/2) * sizeof(nibbles)); b = (nibbles *) malloc (k * (n/2) * sizeof(nibbles)); c_ans = (int32_t *) malloc (m * n * sizeof(int32_t)); c_orig = (int32_t *) malloc (m * n * sizeof(int32_t)); /* std format buffers that will be used by the correctness checker */ a_float = (float *) malloc (m * k * sizeof(float)); b_float = (float *) malloc (k * n * sizeof(float)); c_ans_float = (float *) malloc (m * n * sizeof(float)); c_orig_float = (float *) malloc (m * n * sizeof(float)); /* randomize matrices with float vals */ bli_srandv(m*k, a_float, 1); bli_srandv(k*n, b_float, 1); bli_srandv(m*n, c_orig_float, 1); /* normalize the matrices */ normalize_vec(a_float, m*k); normalize_vec(b_float, k*n); normalize_vec(c_orig_float, m*n); /* cast the float buffers into the buffers for the kernel */ cast_f32_to_i4m (a_float, a, m*k); cast_f32_to_i4m (b_float, b, k*n); /* cast float buffers to support int values */ cast_f32_to_i32m(c_orig_float, c_orig, m*n); cast_i32_to_f32m(c_orig, c_orig_float, m*n); /* cast the kernel buffers into the float buffers to ensure that the values match */ cast_i4_to_f32m (a, a_float, m*k); cast_i4_to_f32m (b, b_float, k*n); /* init alpha and beta */ alpha = 1; beta = 1; /* run kernel to get result in c_ans */ // strides need to be adjusted since 1 element stores 2 values memcpy(c_ans, c_orig, m * n * sizeof(int)); bli_i4gemm( BLIS_NO_TRANSPOSE, BLIS_NO_TRANSPOSE, m, n, k, &alpha, a, rsa/2, csa, b, rsb/2, csb, &beta, c_ans, rsc, csc ); /* cast integer result into float buffer since float is our std format for correctness checking */ cast_i32_to_f32m(c_ans, c_ans_float, m*n); /* using the BLIS GEMM correctness check method, get the resid */ correctness_checker( m, n, k, a_float, rsa, csa, b_float, rsb, csb, c_orig_float, rsc, csc, c_ans_float, (float) alpha, (float) beta ); free(a); free(b); free(c_ans); free(c_orig); free(a_float); free(b_float); free(c_ans_float); free(c_orig_float); } // using the DATATYPE enum, gather test the correctness of the respective GEMM kernel void run_correctness_kernel(int kernel_id, int m, int n, int k) { switch (kernel_id) { case FLOAT16 : shcorrectness_kernel(m, n, k); break; case BFLOAT16: sbcorrectness_kernel(m, n, k); break; case INT16 : i16correctness_kernel(m, n, k); break; case INT8 : i8correctness_kernel(m, n, k); break; case INT4 : i4correctness_kernel(m, n, k); break; default: break; } } void test_correctness(int kernel_id, int start, int end, int inc) { printf("%s correctness test\n", get_kernel_name(kernel_id)); printf("m, n, k, resid\n"); int m,n,k; for (int p=start; p<=end; p+=inc) { m=n=k=p; run_correctness_kernel(kernel_id, m, n, k); } } // correctness test for bfloat16 gemm int main(int argc, char *argv[]) { test_correctness(FLOAT16, 80, 4000, 80); test_correctness(BFLOAT16, 80, 4000, 80); test_correctness(INT16, 80, 4000, 80); test_correctness(INT8, 80, 4000, 80); test_correctness(INT4, 80, 4000, 80); }
de21b4bf542930d64bf42db5ec672d7b8ad82eb9
1b8617545453376ac8bdca000516422d7c01fc2c
/components/micropython/port/src/touchscreen/ns2009/include/median.h
74ad1d2e489198778a41ae9a6037209b6c723809
[ "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sipeed/MaixPy
f1bee59ec3f47a1172928e8363b8307c8cd90c6e
23d09fbccb3dd75138c86f6e82f8d02162938996
refs/heads/master
2023-08-16T10:11:25.652994
2023-06-05T14:05:10
2023-06-05T14:05:10
154,797,251
1,751
492
NOASSERTION
2023-06-05T14:05:11
2018-10-26T07:48:11
Python
UTF-8
C
false
false
618
h
median.h
#ifndef __MEDIAN_H__ #define __MEDIAN_H__ #ifdef __cplusplus extern "C" { #endif #ifndef INT_MIN #define INT_MIN (-1 - 0x7fffffff) #endif #ifndef INT_MAX #define INT_MAX 0x7fffffff #endif struct median_filter_t { int *buffer; int *index; int length; int position; int count; }; struct median_filter_t *median_alloc(int length); void median_free(struct median_filter_t *filter); int median_update(struct median_filter_t *filter, int value); void median_clear(struct median_filter_t *filter); #ifdef __cplusplus } #endif #endif /* __MEDIAN_H__ */
460d2f3601b86c9aaa1ac0ff100d03b489e9a3c7
aa3befea459382dc5c01c925653d54f435b3fb0f
/include/nuttx/sensors/ina3221.h
3cd7700e822f384732b553e1fa24f0af20c30bb7
[ "MIT-open-group", "BSD-3-Clause", "HPND-sell-variant", "BSD-4-Clause-UC", "LicenseRef-scancode-warranty-disclaimer", "MIT-0", "LicenseRef-scancode-bsd-atmel", "LicenseRef-scancode-gary-s-brown", "LicenseRef-scancode-proprietary-license", "SunPro", "MIT", "LicenseRef-scancode-public-domain-disclaimer", "LicenseRef-scancode-other-permissive", "HPND", "ISC", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "GPL-1.0-or-later", "CC-BY-2.0", "CC-BY-4.0" ]
permissive
apache/nuttx
14519a7bff4a87935d94fb8fb2b19edb501c7cec
606b6d9310fb25c7d92c6f95bf61737e3c79fa0f
refs/heads/master
2023-08-25T06:55:45.822534
2023-08-23T16:03:31
2023-08-24T21:25:47
228,103,273
407
241
Apache-2.0
2023-09-14T18:26:05
2019-12-14T23:27:55
C
UTF-8
C
false
false
5,443
h
ina3221.h
/**************************************************************************** * include/nuttx/sensors/ina3221.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The * ASF licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. * ****************************************************************************/ #ifndef __INCLUDE_NUTTX_SENSORS_INA3221_H #define __INCLUDE_NUTTX_SENSORS_INA3221_H /**************************************************************************** * Included Files ****************************************************************************/ #include <nuttx/config.h> #include <nuttx/sensors/ioctl.h> #if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_INA3221) /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ #define INA3221_I2C_ADDR0 0x40 #define INA3221_I2C_ADDR1 0x41 #define INA3221_I2C_ADDR2 0x42 #define INA3221_I2C_ADDR3 0x43 /* INA3221 Register Definitions *********************************************/ /* INA3221 Config Register bits */ #define INA3221_CONFIG_MODE_POWERDOWN 0x0 #define INA3221_CONFIG_MODE_SHUNT_TRIG 0x1 #define INA3221_CONFIG_MODE_BUS_TRIG 0x2 #define INA3221_CONFIG_MODE_BOTH_TRIG 0x3 #define INA3221_CONFIG_MODE_POWERDOWN_1 0x4 #define INA3221_CONFIG_MODE_SHUNT_CONT 0x5 #define INA3221_CONFIG_MODE_BUS_CONT 0x6 #define INA3221_CONFIG_MODE_BOTH_CONT 0x7 #define INA3221_CONFIG_VSHUNTCT_140_US (0x0 << 3) #define INA3221_CONFIG_VSHUNTCT_204_US (0x1 << 3) #define INA3221_CONFIG_VSHUNTCT_332_US (0x2 << 3) #define INA3221_CONFIG_VSHUNTCT_588_US (0x3 << 3) #define INA3221_CONFIG_VSHUNTCT_1100_US (0x4 << 3) #define INA3221_CONFIG_VSHUNTCT_2116_US (0x5 << 3) #define INA3221_CONFIG_VSHUNTCT_4156_US (0x6 << 3) #define INA3221_CONFIG_VSHUNTCT_8244_US (0x7 << 3) #define INA3221_CONFIG_VBUSCT_140_US (0x0 << 6) #define INA3221_CONFIG_VBUSCT_204_US (0x1 << 6) #define INA3221_CONFIG_VBUSCT_332_US (0x2 << 6) #define INA3221_CONFIG_VBUSCT_588_US (0x3 << 6) #define INA3221_CONFIG_VBUSCT_1100_US (0x4 << 6) #define INA3221_CONFIG_VBUSCT_2116_US (0x5 << 6) #define INA3221_CONFIG_VBUSCT_4156_US (0x6 << 6) #define INA3221_CONFIG_VBUSCT_8244_US (0x7 << 6) #define INA3221_CONFIG_AVG_NSAMPLES_1 (0x0 << 9) #define INA3221_CONFIG_AVG_NSAMPLES_4 (0x1 << 9) #define INA3221_CONFIG_AVG_NSAMPLES_16 (0x2 << 9) #define INA3221_CONFIG_AVG_NSAMPLES_64 (0x3 << 9) #define INA3221_CONFIG_AVG_NSAMPLES_128 (0x4 << 9) #define INA3221_CONFIG_AVG_NSAMPLES_256 (0x5 << 9) #define INA3221_CONFIG_AVG_NSAMPLES_512 (0x6 << 9) #define INA3221_CONFIG_AVG_NSAMPLES_1024 (0x7 << 9) #define INA3221_CONFIG_CH1_EN (1 << 14) #define INA3221_CONFIG_CH2_EN (1 << 13) #define INA3221_CONFIG_CH3_EN (1 << 12) /**************************************************************************** * Public Types ****************************************************************************/ struct i2c_master_s; struct ina3221_config_s { uint8_t addr; int32_t shunt_resistor[3]; uint16_t cfgreg; }; struct ina3221_channel_s { uint32_t voltage; /* [microvolt] max 4.2 kV - device max 26V */ int32_t current; /* [microampere] max 2.1 kA - sensor is bidirectional */ }; struct ina3221_s { struct ina3221_channel_s ch[3]; }; /**************************************************************************** * Public Function Prototypes ****************************************************************************/ #ifdef __cplusplus #define EXTERN extern "C" extern "C" { #else #define EXTERN extern #endif /**************************************************************************** * Name: ina3221_register * * Description: * Register the ina3221 character device as 'devpath' * * Input Parameters: * devpath - The full path to the driver to register. E.g., "/dev/pwrmntr0" * i2c - An instance of the I2C interface to use to communicate with INA3221 * addr - The I2C address of the INA3221. * The base I2C address of the INA3221 is 0x80. * Bits 0-1 can be controlled to get 4 unique addresses from 0x80 * through 0x83. * shuntval - resistor value in microohms * config - a combination of the constants defined earlier in this file * * Returned Value: * Zero (OK) on success; a negated errno value on failure. * ****************************************************************************/ int ina3221_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, FAR const struct ina3221_config_s *config); #undef EXTERN #ifdef __cplusplus } #endif #endif /* CONFIG_I2C && CONFIG_SENSORS_INA3221 */ #endif /* __INCLUDE_NUTTX_SENSORS_INA3221_H */
9763918f034ee5767b231ede668b42389896b89b
fb0f9abad373cd635c2635bbdf491ea0f32da5ff
/src/coreclr/nativeaot/Runtime/clreventpipewriteevents.h
92da9196ec901e5d3fc1245b09723c3cc0bb48e5
[ "MIT" ]
permissive
dotnet/runtime
f6fd23936752e202f8e4d6d94f3a4f3b0e77f58f
47bb554d298e1e34c4e3895d7731e18ad1c47d02
refs/heads/main
2023-09-03T15:35:46.493337
2023-09-03T08:13:23
2023-09-03T08:13:23
210,716,005
13,765
5,179
MIT
2023-09-14T21:58:52
2019-09-24T23:36:39
C#
UTF-8
C
false
false
22,315
h
clreventpipewriteevents.h
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // Work In Progress to add native events to EventPipe // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase // @TODO: Audit native events in NativeAOT Runtime BOOL EventPipeEventEnabledDestroyGCHandle(void); ULONG EventPipeWriteEventDestroyGCHandle( const void* HandleID, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledExceptionThrown_V1(void); ULONG EventPipeWriteEventExceptionThrown_V1( const WCHAR* ExceptionType, const WCHAR* ExceptionMessage, const void* ExceptionEIP, const unsigned int ExceptionHRESULT, const unsigned short ExceptionFlags, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCBulkEdge(void); ULONG EventPipeWriteEventGCBulkEdge( const unsigned int Index, const unsigned int Count, const unsigned short ClrInstanceID, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCBulkMovedObjectRanges(void); ULONG EventPipeWriteEventGCBulkMovedObjectRanges( const unsigned int Index, const unsigned int Count, const unsigned short ClrInstanceID, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCBulkNode(void); ULONG EventPipeWriteEventGCBulkNode( const unsigned int Index, const unsigned int Count, const unsigned short ClrInstanceID, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCBulkRCW(void); ULONG EventPipeWriteEventGCBulkRCW( const unsigned int Count, const unsigned short ClrInstanceID, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCBulkRootCCW(void); ULONG EventPipeWriteEventGCBulkRootCCW( const unsigned int Count, const unsigned short ClrInstanceID, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCBulkRootConditionalWeakTableElementEdge(void); ULONG EventPipeWriteEventGCBulkRootConditionalWeakTableElementEdge( const unsigned int Index, const unsigned int Count, const unsigned short ClrInstanceID, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCBulkRootEdge(void); ULONG EventPipeWriteEventGCBulkRootEdge( const unsigned int Index, const unsigned int Count, const unsigned short ClrInstanceID, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCBulkSurvivingObjectRanges(void); ULONG EventPipeWriteEventGCBulkSurvivingObjectRanges( const unsigned int Index, const unsigned int Count, const unsigned short ClrInstanceID, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCCreateConcurrentThread_V1(void); ULONG EventPipeWriteEventGCCreateConcurrentThread_V1( const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCCreateSegment_V1(void); ULONG EventPipeWriteEventGCCreateSegment_V1( const unsigned __int64 Address, const unsigned __int64 Size, const unsigned int Type, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCEnd_V1(void); ULONG EventPipeWriteEventGCEnd_V1( const unsigned int Count, const unsigned int Depth, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCFreeSegment_V1(void); ULONG EventPipeWriteEventGCFreeSegment_V1( const unsigned __int64 Address, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCGenerationRange(void); ULONG EventPipeWriteEventGCGenerationRange( const unsigned char Generation, const void* RangeStart, const unsigned __int64 RangeUsedLength, const unsigned __int64 RangeReservedLength, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCHeapStats_V1(void); ULONG EventPipeWriteEventGCHeapStats_V1( const unsigned __int64 GenerationSize0, const unsigned __int64 TotalPromotedSize0, const unsigned __int64 GenerationSize1, const unsigned __int64 TotalPromotedSize1, const unsigned __int64 GenerationSize2, const unsigned __int64 TotalPromotedSize2, const unsigned __int64 GenerationSize3, const unsigned __int64 TotalPromotedSize3, const unsigned __int64 FinalizationPromotedSize, const unsigned __int64 FinalizationPromotedCount, const unsigned int PinnedObjectCount, const unsigned int SinkBlockCount, const unsigned int GCHandleCount, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCJoin_V2(void); ULONG EventPipeWriteEventGCJoin_V2( const unsigned int Heap, const unsigned int JoinTime, const unsigned int JoinType, const unsigned short ClrInstanceID, const unsigned int JoinID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCMarkFinalizeQueueRoots(void); ULONG EventPipeWriteEventGCMarkFinalizeQueueRoots( const unsigned int HeapNum, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCMarkHandles(void); ULONG EventPipeWriteEventGCMarkHandles( const unsigned int HeapNum, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCMarkOlderGenerationRoots(void); ULONG EventPipeWriteEventGCMarkOlderGenerationRoots( const unsigned int HeapNum, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCMarkStackRoots(void); ULONG EventPipeWriteEventGCMarkStackRoots( const unsigned int HeapNum, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCMarkWithType(void); ULONG EventPipeWriteEventGCMarkWithType( const unsigned int HeapNum, const unsigned short ClrInstanceID, const unsigned int Type, const unsigned __int64 Bytes, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCPerHeapHistory_V3(void); ULONG EventPipeWriteEventGCPerHeapHistory_V3( const unsigned short ClrInstanceID, const void* FreeListAllocated, const void* FreeListRejected, const void* EndOfSegAllocated, const void* CondemnedAllocated, const void* PinnedAllocated, const void* PinnedAllocatedAdvance, const unsigned int RunningFreeListEfficiency, const unsigned int CondemnReasons0, const unsigned int CondemnReasons1, const unsigned int CompactMechanisms, const unsigned int ExpandMechanisms, const unsigned int HeapIndex, const void* ExtraGen0Commit, const unsigned int Count, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCTerminateConcurrentThread_V1(void); ULONG EventPipeWriteEventGCTerminateConcurrentThread_V1( const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCTriggered(void); ULONG EventPipeWriteEventGCTriggered( const unsigned int Reason, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledModuleLoad_V2(void); ULONG EventPipeWriteEventModuleLoad_V2( const unsigned __int64 ModuleID, const unsigned __int64 AssemblyID, const unsigned int ModuleFlags, const unsigned int Reserved1, const WCHAR* ModuleILPath, const WCHAR* ModuleNativePath, const unsigned short ClrInstanceID, const GUID* ManagedPdbSignature, const unsigned int ManagedPdbAge, const WCHAR* ManagedPdbBuildPath, const GUID* NativePdbSignature, const unsigned int NativePdbAge, const WCHAR* NativePdbBuildPath, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledSetGCHandle(void); ULONG EventPipeWriteEventSetGCHandle( const void* HandleID, const void* ObjectID, const unsigned int Kind, const unsigned int Generation, const unsigned __int64 AppDomainID, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCStart_V2(void); ULONG EventPipeWriteEventGCStart_V2( const unsigned int Count, const unsigned int Depth, const unsigned int Reason, const unsigned int Type, const unsigned short ClrInstanceID, const unsigned __int64 ClientSequenceNumber, const GUID * ActivityId,// = nullptr, const GUID * RelatedActivityId// = nullptr ); BOOL EventPipeEventEnabledGCRestartEEEnd_V1(void); ULONG EventPipeWriteEventGCRestartEEEnd_V1( const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCRestartEEBegin_V1(void); ULONG EventPipeWriteEventGCRestartEEBegin_V1( const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCSuspendEEEnd_V1(void); ULONG EventPipeWriteEventGCSuspendEEEnd_V1( const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCSuspendEEBegin_V1(void); ULONG EventPipeWriteEventGCSuspendEEBegin_V1( const unsigned int Reason, const unsigned int Count, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledDecreaseMemoryPressure(void); ULONG EventPipeWriteEventDecreaseMemoryPressure( const unsigned __int64 BytesFreed, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledFinalizeObject(void); ULONG EventPipeWriteEventFinalizeObject( const void* TypeID, const void* ObjectID, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCFinalizersBegin_V1(void); ULONG EventPipeWriteEventGCFinalizersBegin_V1( const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCFinalizersEnd_V1(void); ULONG EventPipeWriteEventGCFinalizersEnd_V1( const unsigned int Count, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledContentionStart_V2(void); ULONG EventPipeWriteEventContentionStart_V2( const unsigned char ContentionFlags, const unsigned short ClrInstanceID, const void* LockID, const void* AssociatedObjectID, const unsigned __int64 LockOwnerThreadID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledContentionStop_V1(void); ULONG EventPipeWriteEventContentionStop_V1( const unsigned char ContentionFlags, const unsigned short ClrInstanceID, const double DurationNs, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledContentionLockCreated(void); ULONG EventPipeWriteEventContentionLockCreated( const void* LockID, const void* AssociatedObjectID, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolWorkerThreadStart(void); ULONG EventPipeWriteEventThreadPoolWorkerThreadStart( const unsigned int ActiveWorkerThreadCount, const unsigned int RetiredWorkerThreadCount, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolWorkerThreadStop(void); ULONG EventPipeWriteEventThreadPoolWorkerThreadStop( const unsigned int ActiveWorkerThreadCount, const unsigned int RetiredWorkerThreadCount, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolWorkerThreadWait(void); ULONG EventPipeWriteEventThreadPoolWorkerThreadWait( const unsigned int ActiveWorkerThreadCount, const unsigned int RetiredWorkerThreadCount, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolMinMaxThreads(void); ULONG EventPipeWriteEventThreadPoolMinMaxThreads( const unsigned short MinWorkerThreads, const unsigned short MaxWorkerThreads, const unsigned short MinIOCompletionThreads, const unsigned short MaxIOCompletionThreads, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentSample(void); ULONG EventPipeWriteEventThreadPoolWorkerThreadAdjustmentSample( const double Throughput, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentAdjustment(void); ULONG EventPipeWriteEventThreadPoolWorkerThreadAdjustmentAdjustment( const double AverageThroughput, const unsigned int NewWorkerThreadCount, const unsigned int Reason, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentStats(void); ULONG EventPipeWriteEventThreadPoolWorkerThreadAdjustmentStats( const double Duration, const double Throughput, const double ThreadWave, const double ThroughputWave, const double ThroughputErrorEstimate, const double AverageThroughputErrorEstimate, const double ThroughputRatio, const double Confidence, const double NewControlSetting, const unsigned short NewThreadWaveMagnitude, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolIOEnqueue(void); ULONG EventPipeWriteEventThreadPoolIOEnqueue( const void* NativeOverlapped, const void* Overlapped, const BOOL MultiDequeues, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolIODequeue(void); ULONG EventPipeWriteEventThreadPoolIODequeue( const void* NativeOverlapped, const void* Overlapped, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolWorkingThreadCount(void); ULONG EventPipeWriteEventThreadPoolWorkingThreadCount( const unsigned int Count, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledThreadPoolIOPack(void); ULONG EventPipeWriteEventThreadPoolIOPack( const void* NativeOverlapped, const void* Overlapped, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCAllocationTick_V4(void); ULONG EventPipeWriteEventGCAllocationTick_V4( const unsigned int AllocationAmount, const unsigned int AllocationKind, const unsigned short ClrInstanceID, const unsigned __int64 AllocationAmount64, const void* TypeID, const WCHAR* TypeName, const unsigned int HeapIndex, const void* Address, const unsigned __int64 ObjectSize, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCHeapStats_V2(void); ULONG EventPipeWriteEventGCHeapStats_V2( const unsigned __int64 GenerationSize0, const unsigned __int64 TotalPromotedSize0, const unsigned __int64 GenerationSize1, const unsigned __int64 TotalPromotedSize1, const unsigned __int64 GenerationSize2, const unsigned __int64 TotalPromotedSize2, const unsigned __int64 GenerationSize3, const unsigned __int64 TotalPromotedSize3, const unsigned __int64 FinalizationPromotedSize, const unsigned __int64 FinalizationPromotedCount, const unsigned int PinnedObjectCount, const unsigned int SinkBlockCount, const unsigned int GCHandleCount, const unsigned short ClrInstanceID, const unsigned __int64 GenerationSize4, const unsigned __int64 TotalPromotedSize4, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCSampledObjectAllocationHigh(void); ULONG EventPipeWriteEventGCSampledObjectAllocationHigh( const void* Address, const void* TypeID, const unsigned int ObjectCountForTypeSample, const unsigned __int64 TotalSizeForTypeSample, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCSampledObjectAllocationLow(void); ULONG EventPipeWriteEventGCSampledObjectAllocationLow( const void* Address, const void* TypeID, const unsigned int ObjectCountForTypeSample, const unsigned __int64 TotalSizeForTypeSample, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledPinObjectAtGCTime(void); ULONG EventPipeWriteEventPinObjectAtGCTime( const void* HandleID, const void* ObjectID, const unsigned __int64 ObjectSize, const WCHAR* TypeName, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCBulkRootStaticVar(void); ULONG EventPipeWriteEventGCBulkRootStaticVar( const unsigned int Count, const unsigned __int64 AppDomainID, const unsigned short ClrInstanceID, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledIncreaseMemoryPressure(void); ULONG EventPipeWriteEventIncreaseMemoryPressure( const unsigned __int64 BytesAllocated, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCGlobalHeapHistory_V4(void); ULONG EventPipeWriteEventGCGlobalHeapHistory_V4( const unsigned __int64 FinalYoungestDesired, const signed int NumHeaps, const unsigned int CondemnedGeneration, const unsigned int Gen0ReductionCount, const unsigned int Reason, const unsigned int GlobalMechanisms, const unsigned short ClrInstanceID, const unsigned int PauseMode, const unsigned int MemoryPressure, const unsigned int CondemnReasons0, const unsigned int CondemnReasons1, const unsigned int Count, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGenAwareBegin(void); ULONG EventPipeWriteEventGenAwareBegin( const unsigned int Count, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGenAwareEnd(void); ULONG EventPipeWriteEventGenAwareEnd( const unsigned int Count, const unsigned short ClrInstanceID, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCLOHCompact(void); ULONG EventPipeWriteEventGCLOHCompact( const unsigned short ClrInstanceID, const unsigned short Count, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr ); BOOL EventPipeEventEnabledGCFitBucketInfo(void); ULONG EventPipeWriteEventGCFitBucketInfo( const unsigned short ClrInstanceID, const unsigned short BucketKind, const unsigned __int64 TotalSize, const unsigned short Count, int Values_ElementSize, const void* Values, const GUID * ActivityId = nullptr, const GUID * RelatedActivityId = nullptr );
5442f743e78d1efdabc98748c2a2d6e428b142d2
00fbe208cec31dc61ca326ea0c7c8711e4a8db2a
/legacy/src/server/slimrds/data/process.h
7c58ec37d8b5fade56e7caec9e5979ede246bba7
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
twitter/pelikan
9725f1a5d1e30ebbdbcf3b0177c4dae130806b1d
e7a76c92d8a6b401475ce53d3cefe964f1e7fbb6
refs/heads/master
2023-08-14T05:07:36.020898
2022-10-27T17:13:29
2022-10-27T17:13:29
42,829,191
1,880
180
Apache-2.0
2023-05-12T12:23:40
2015-09-20T20:51:55
C
UTF-8
C
false
false
1,505
h
process.h
#pragma once #include "cmd_bitmap.h" #include "cmd_misc.h" #include <buffer/cc_buf.h> #include <cc_metric.h> #include <cc_option.h> #define ALLOW_FLUSH false /* name type default description */ #define PROCESS_OPTION(ACTION) \ ACTION( allow_flush, OPTION_TYPE_BOOL, ALLOW_FLUSH, "allow flushing on the data port" ) typedef struct { PROCESS_OPTION(OPTION_DECLARE) } process_options_st; /* name type description */ #define PROCESS_METRIC(ACTION) \ ACTION( process_req, METRIC_COUNTER, "# requests processed" )\ ACTION( process_ex, METRIC_COUNTER, "# processing error" )\ ACTION( process_client_ex, METRIC_COUNTER, "# internal error" )\ ACTION( process_server_ex, METRIC_COUNTER, "# internal error" ) typedef struct { PROCESS_METRIC(METRIC_DECLARE) PROCESS_BITMAP_METRIC(METRIC_DECLARE) PROCESS_MISC_METRIC(METRIC_DECLARE) } process_metrics_st; extern process_metrics_st *process_metrics; extern bool allow_flush; void process_setup(process_options_st *options, process_metrics_st *metrics); void process_teardown(void); int slimrds_process_read(struct buf **rbuf, struct buf **wbuf, void **data); int slimrds_process_write(struct buf **rbuf, struct buf **wbuf, void **data); int slimrds_process_error(struct buf **rbuf, struct buf **wbuf, void **data);
1c7c9a524c78ce3b0de99298cd4d2cc5266ed62e
0744dcc5394cebf57ebcba343747af6871b67017
/tools/nxfuse/src/tinyara_services.c
b99196ad7d31ab556a5a2759b8dfcabbcef8e574
[ "Apache-2.0" ]
permissive
Samsung/TizenRT
96abf62f1853f61fcf91ff14671a5e0c6ca48fdb
1a5c2e00a4b1bbf4c505bbf5cc6a8259e926f686
refs/heads/master
2023-08-31T08:59:33.327998
2023-08-08T06:09:20
2023-08-31T04:38:20
82,517,252
590
719
Apache-2.0
2023-09-14T06:54:49
2017-02-20T04:38:30
C
UTF-8
C
false
false
17,163
c
tinyara_services.c
/**************************************************************************** * * Copyright 2019 Samsung Electronics All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. * ****************************************************************************/ /**************************************************************************** * SmartFUSE - A FUSE filesystem for mounting NuttX FS natively under Linux. * * tools/nxfuse/tinyara_services.c: * * Contains wrapper functions and virtual mount services to emulate * to emulate NuttX operations. * * Copyright (C) 2016 Ken Pettit. All rights reserved. * Author: Ken Pettit <pettitkd@gmail.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ /**************************************************************************** * Included Files ****************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <stdarg.h> #include <errno.h> #include <debug.h> #include <tinyara/config.h> #include <tinyara/fs/fs.h> #include <tinyara/fs/mtd.h> #include <tinyara/fs/smart.h> #include <tinyara/fs/ioctl.h> #include <limits.h> #include "nxfuse.h" /**************************************************************************** * Private Types ****************************************************************************/ struct fs_ops_s { const char *fs_name; void *(*vmount)(const char *datasource, const char *mount_point, int erasesize, int sectsize, int pagesize, char *generic); int (*mkfs)(const char *datasource, uint32_t erasesize, uint16_t sectsize, int pagesize, char *, int confirm); const struct mountpt_operations *pops; }; /**************************************************************************** * Extern referenced data ****************************************************************************/ #ifdef CONFIG_FS_SMARTFS extern const struct mountpt_operations smartfs_operations; #endif extern void filemtd_teardown(FAR struct mtd_dev_s *dev); extern FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, size_t offset, int16_t sectsize, int32_t erasesize); /**************************************************************************** * Private Function Prototypes ****************************************************************************/ #ifdef CONFIG_FS_SMARTFS static void *smartfs_vmount(const char *datasource, const char *mount_point, uint32_t erasesize, uint16_t sectsize, int pagesize, char *generic); static int smartfs_mkfs(const char *datasource, uint32_t erasesize, uint16_t sectsize, int pagesize, char *generic, int confirm); #endif /**************************************************************************** * Private Variables ****************************************************************************/ static struct inode *g_inodes[10]; static int g_inode_count = 0; /* Table of known NuttX FS types we can mount */ static struct fs_ops_s g_fs_ops[] = { #ifdef CONFIG_FS_SMARTFS {"smartfs", smartfs_vmount, smartfs_mkfs, &smartfs_operations}, #endif {"", NULL, NULL} }; /**************************************************************************** * Private Functions ****************************************************************************/ /**************************************************************************** * Name: get_errno ****************************************************************************/ int get_errno(void) { return errno; } /**************************************************************************** * Name: mtd_register * * Dummy stub function * ****************************************************************************/ int mtd_register(FAR struct mtd_dev_s *mtd, FAR const char *name) { return 0; } /**************************************************************************** * Name: mtd_unregister * * Dummy stub function * ****************************************************************************/ int mtd_unregister(FAR struct mtd_dev_s *mtd) { return 0; } /**************************************************************************** * Name: register_driver * * Dummy stub function * ****************************************************************************/ int register_driver(FAR const char *path, FAR const struct file_operations *fops, mode_t mode, FAR void *priv) { return 0; } /**************************************************************************** * Name: register_blockdriver * * Simple registration support * ****************************************************************************/ int register_blockdriver(FAR const char *path, FAR const struct block_operations *bops, mode_t mode, FAR void *priv) { struct inode *node; int ret; node = calloc(sizeof(struct inode) + PATH_MAX, 1); if (node == NULL) { return -1; } strncpy(node->i_name, path, PATH_MAX); node->i_crefs = 0; node->i_peer = NULL; node->i_child = NULL; node->u.i_bops = bops; #ifdef CONFIG_FILE_MODE node->i_mode = mode; #endif node->i_private = priv; ret = OK; g_inodes[g_inode_count++] = node; return ret; } /**************************************************************************** * Name: open_blockdriver * * Simple find / open support for block drivers * ****************************************************************************/ int open_blockdriver(FAR const char *pathname, int mountflags, FAR struct inode **ppinode) { int x; for (x = 0; x < g_inode_count; x++) { if (strcmp(pathname, g_inodes[x]->i_name) == 0) { *ppinode = g_inodes[x]; g_inodes[x]->i_crefs++; return 0; } } *ppinode = NULL; return -1; } /**************************************************************************** * Name: close_blockdriver * * Simple close support for block drivers * ****************************************************************************/ int close_blockdriver(FAR struct inode *pinode) { pinode->i_crefs--; return OK; } /**************************************************************************** * Name: unregister_blockdriver * * Simple unregister support for block drivers * ****************************************************************************/ int unregister_blockdriver(FAR const char *pathname) { int x; struct inode *pinode; for (x = 0; x < g_inode_count; x++) { if (strcmp(pathname, g_inodes[x]->i_name) == 0) { pinode = g_inodes[x]; g_inodes[x] = g_inodes[--g_inode_count]; free(pinode); } } return OK; } /**************************************************************************** * Name: dbg * * A dbg implementation that maps to printf * ****************************************************************************/ #ifdef CONFIG_DEBUG int dbg(const char *fmt, ...) { va_list args; int ret; va_start(args, fmt); ret = vprintf(fmt, args); va_end(args); return ret; } #endif /**************************************************************************** * Name: vdbg * * A dbg implementation that maps to printf * ****************************************************************************/ #ifdef CONFIG_DEBUG_VERBOSE int vdbg(const char *fmt, ...) { va_list args; int ret; va_start(args, fmt); ret = vprintf(fmt, args); va_end(args); return ret; } #endif /**************************************************************************** * Name: vmount * * A virtual mount implemention for registered NuttX filesystems. Mount * is performed based on the provided fs_type. * ****************************************************************************/ struct inode *vmount(const char *datasource, const char *mount_point, const char *fs_type, int erasesize, int sectsize, int pagesize, char *generic) { int x; void *fs_handle; struct inode *pinode; /* Loop for all known NuttX FS types */ for (x = 0; g_fs_ops[x].vmount != NULL; x++) { /* Test if this is the FS we need to mount */ if (strcmp(fs_type, g_fs_ops[x].fs_name) == 0) { /* Mount this FS */ fs_handle = g_fs_ops[x].vmount(datasource, mount_point, erasesize, sectsize, pagesize, generic); /* Test if mount failed */ if (fs_handle == NULL) { return NULL; } /* Setup a new inode */ pinode = calloc(sizeof(struct inode), 1); pinode->i_crefs = 1; pinode->i_private = fs_handle; pinode->u.i_mops = g_fs_ops[x].pops; return pinode; } } /* Unknown fs_type */ dbg("Unknown filesystem type: %s\n", fs_type); return NULL; } /**************************************************************************** * Name: smartfs_vmount * * The mount implementation for SmartFS type FS. * * This creates a file based MTD device using the given datasource and * initialized smart MTD and SmartFS on that filemtd device. * ****************************************************************************/ #ifdef CONFIG_FS_SMARTFS void *smartfs_vmount(const char *datasource, const char *mount_point, uint32_t erasesize, uint16_t sectsize, int pagesize, char *generic) { int ret; int offset = 0; struct mtd_dev_s *mtd; void *fshandle; struct inode *blkdriver; #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS char blkname[20]; int nrootdirs; #endif /* Try to create a filemtd device using the filename provided */ mtd = filemtd_initialize(datasource, offset, pagesize, erasesize); if (mtd == NULL) { printf("error %d opening %s\n", errno, datasource); return NULL; } /* Now initialize the SMART routines on the MTD */ ret = smart_initialize(0, mtd, NULL); if (ret != OK) { printf("error initializing SmartFS on %s\n", datasource); filemtd_teardown(mtd); return NULL; } /* Setup the SmartFS */ #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS /* The generic parameter is the directory number to mount */ nrootdirs = atoi(generic); if (nrootdirs == 0) { /* If the root directory number is not specified, * then default to 1. */ nrootdirs++; } snprintf(blkname, sizeof(blkname), "/dev/smart0d%d", nrootdirs); ret = open_blockdriver(blkname, 0, &blkdriver); #else ret = open_blockdriver("/dev/smart0", 0, &blkdriver); #endif ret = smartfs_operations.bind(blkdriver, NULL, &fshandle); if (ret != OK) { return NULL; } return fshandle; } #endif /* CONFIG_FS_SMARTFS */ /**************************************************************************** * Name: mkfs * * A virtual mount implemention for registered NuttX filesystems. Mount * is performed based on the provided fs_type. * ****************************************************************************/ int mkfs(const char *datasource, const char *fs_type, uint32_t erasesize, uint16_t sectsize, int pagesize, char *generic, int confirm) { int x; int ret = -ENODEV; /* Loop for all known NuttX FS types */ for (x = 0; g_fs_ops[x].vmount != NULL; x++) { /* Test if this is the FS we need to mount */ if (strcmp(fs_type, g_fs_ops[x].fs_name) == 0) { /* Call this FS's mkfs routine */ if (g_fs_ops[x].mkfs != NULL) { ret = g_fs_ops[x].mkfs(datasource, erasesize, sectsize, pagesize, generic, confirm); } return ret; } } /* Unknown fs_type */ dbg("Unknown filesystem type: %s\n", fs_type); return ret; } /**************************************************************************** * Name: smartfs_umount * * Unmounts a previously mounted SmartFS * ****************************************************************************/ #ifdef CONFIG_FS_SMARTFS static int smartfs_umount(struct inode *blkdriver, void *fshandle) { int ret; struct mtd_dev_s *mtd; /* Get the block driver */ #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS ret = open_blockdriver("/dev/smart0d1", 0, &blkdriver); #else ret = open_blockdriver("/dev/smart0", 0, &blkdriver); #endif free(fshandle); /* The blkdriver private data is an MTD pointer */ mtd = *((struct mtd_dev_s **)blkdriver->i_private); filemtd_teardown(mtd); free(blkdriver->i_private); #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS unregister_blockdriver("/dev/smart0d1"); #else unregister_blockdriver("/dev/smart0"); #endif return ret; } /**************************************************************************** * Name: smartfs_mkfs * * Creates a SmartfS filesystem on the datasource * ****************************************************************************/ static int smartfs_mkfs(const char *datasource, uint32_t erasesize, uint16_t sectsize, int pagesize, char *generic, int confirm) { int ret; int x; void *fshandle; struct inode *blkdriver; uint8_t type; struct smart_read_write_s request; /* Try to mount the device to see if there is a format already */ fshandle = smartfs_vmount(datasource, "/tmp", erasesize, sectsize, pagesize, ""); if (fshandle != NULL) { /* Test if confirm was specified */ if (!confirm) { printf("\nSheepishly refusing to reformat ... use -c to confirm\n\n"); /* Unmount the datasource */ smartfs_umount(blkdriver, fshandle); return -EACCES; } } /* Okay to format the device. Get the block driver inode */ if (fshandle == NULL) { printf("\nFormatting %s with smartfs format\n", datasource); } else { printf("\nReformatting %s with smartfs format\n", datasource); } #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS ret = open_blockdriver("/dev/smart0d1", 0, &blkdriver); #else ret = open_blockdriver("/dev/smart0", 0, &blkdriver); #endif /* Perform a low-level SMART format */ #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS ret = blkdriver->u.i_bops->ioctl(blkdriver, BIOC_LLFORMAT, ((uint64_t)sectsize << 16) | atoi(generic)); #else ret = blkdriver->u.i_bops->ioctl(blkdriver, BIOC_LLFORMAT, ((uint64_t)sectsize << 16)); #endif if (ret != OK) { close_blockdriver(blkdriver); printf("Error %d during low-level format\n", ret); return ret; } /* Unmount the datasource */ smartfs_umount(blkdriver, fshandle); fshandle = smartfs_vmount(datasource, "/tmp", erasesize, sectsize, pagesize, ""); #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS ret = open_blockdriver("/dev/smart0d1", 0, &blkdriver); #else ret = open_blockdriver("/dev/smart0", 0, &blkdriver); #endif /* Now Write the filesystem to media. Loop for each root dir entry and * allocate the reserved Root Dir Enty, then write a blank root dir for it. */ type = SMARTFS_SECTOR_TYPE_DIR; request.offset = 0; request.count = 1; request.buffer = &type; x = 0; #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS for (; x < atoi(generic); x++) #endif { ret = blkdriver->u.i_bops->ioctl(blkdriver, BIOC_ALLOCSECT, SMARTFS_ROOT_DIR_SECTOR + x); if (ret != SMARTFS_ROOT_DIR_SECTOR + x) { ret = -EIO; printf("Error %d allocating sector\n", ret); return ret; } /* Mark this block as a directory entry */ request.logsector = SMARTFS_ROOT_DIR_SECTOR + x; /* Issue a write to the sector, single byte */ ret = blkdriver->u.i_bops->ioctl(blkdriver, BIOC_WRITESECT, (unsigned long)&request); if (ret != 0) { ret = -EIO; printf("Error %d writing rootdir sector\n", ret); return ret; } } printf("Format successful\n"); return ret; } #endif /* CONFIG_FS_SMARTFS */
3d1a3849d3087f80780ad87f22a5a584f2b8a3ab
c26d7b0ed875357278e61627da2da0650da77986
/src/cmd/ps.c
ada4184c56524736bbcf968e45b20825ae6390e3
[ "BSD-3-Clause" ]
permissive
RetroBSD/retrobsd
5343d9e3c424637fc3ad5b03fe720b2744490025
486f81f6abff01c7dcc207235cd2979b226a95ff
refs/heads/master
2023-09-02T23:12:05.110883
2023-07-07T18:41:40
2023-07-07T18:41:40
18,598,087
282
59
BSD-3-Clause
2023-07-18T07:35:36
2014-04-09T13:25:46
C
UTF-8
C
false
false
20,695
c
ps.c
/* * 1999/8/11 - Remove reference to SDETACH. It was removed from the kernel * (finally) because it was not needed. * * 1997/12/16 - Fix coredump when processing -U. * * 1996/11/16 - Move 'psdatabase' in /var/run. * * 12/20/94 - Missing casts caused errors in reporting on swapped * processes - sms * 1/7/93 - Heavily revised when the symbol table format changed - sms * * ps - process status * Usage: ps [ acgklnrtuwxU# ] [ corefile [ swapfile ] ] */ #include <stdio.h> #include <stdlib.h> #include <pwd.h> #include <a.out.h> #include <ctype.h> #include <string.h> #include <strings.h> #include <unistd.h> #include <fcntl.h> #include <sys/param.h> #include <sys/file.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/user.h> #include <sys/proc.h> #include <utmp.h> #include <paths.h> #include <psout.h> #define within(x,y,z) (((unsigned)(x) >= (y)) && ((unsigned)(x) < (z))) #define round(x,y) ((long) ((((long) (x) + (long) (y) - 1L) / (long) (y)) * (long) (y))) struct nlist nl[] = { #define X_PROC 0 { "_proc" }, #define X_NPROC 1 { "_nproc" }, #define X_HZ 2 { "_hz" }, { "_ipc" }, { "_lbolt" }, { "_memlock" }, { "_runin" }, { "_runout" }, { "_selwait" }, { "_u" }, { "" }, }; /* * This is no longer the size of a symbol's name, symbols can be much * larger now. This define says how many characters of a symbol's name * to save in the wait channel name. A new define has been created to * limit the size of symbol string read from the string table. */ #define NNAMESIZ 8 #define MAXSYMLEN 32 struct proc *mproc, proc[8]; struct user u; int hz; int chkpid = 0; char aflg; /* -a: all processes, not just mine */ char cflg; /* -c: not complete listing of args, just comm. */ char gflg; /* -g: complete listing including group headers, etc */ char kflg; /* -k: read from core file instead of real memory */ char lflg; /* -l: long listing form */ char nflg; /* -n: numeric wchans */ char rflg; /* -r: raw output in style <psout.h> */ char uflg; /* -u: user name */ char wflg; /* -w[w]: wide terminal */ char xflg; /* -x: ALL processes, even those without ttys */ char *tptr, *mytty; char *uname; int file; int nproc; int nchans; int nttys; int npr; /* number of processes found so far */ int twidth; /* terminal width */ int cmdstart; /* start position for command field */ char *memf; /* name of kernel memory file */ char *kmemf = "/dev/kmem"; /* name of physical memory file */ char *swapf; /* name of swap file to use */ int kmem, mem, swap; /* * Structure for the unix wchan table */ typedef struct wchan { char cname[NNAMESIZ]; unsigned caddr; } WCHAN; WCHAN *wchand; /* * 256 terminals was not only wasteful but unrealistic. For one thing * 2.11BSD uses bit 7 of the minor device (for almost all terminal interfaces) * to indicate direct/modem status - this means that 128 terminals is * a better maximum number of terminals, for another thing the system can't * support 256 terminals - other resources (memory, files, processes) will * have been exhausted long ago. If 'ps' complains about too many terminals * it is time to clean up /dev! */ #define MAXTTYS 160 /* 128 plus a few extra */ struct ttys { char name[14]; /* MAXNAMLEN uses too much memory, besides */ /* device names tend to be very short */ dev_t ttyd; } allttys[MAXTTYS]; struct map { off_t b1, e1; off_t f1; off_t b2, e2; off_t f2; }; struct winsize ws; struct map datmap; struct psout *outargs; /* info for first npr processes */ /* * Attempt to avoid stats by guessing minor device * numbers from tty names. Console is known, * know that r(hp|up|mt) are unlikely as are different mem's, * floppy, null, tty, etc. */ void maybetty(cp) register char *cp; { register struct ttys *dp; struct stat stb; /* Allow only terminal devices. */ switch (cp[0]) { case 'c': if (strcmp(cp, "console") == 0) break; return; case 't': if (strncmp(cp, "tty", 3) == 0) break; return; default: return; } if (nttys >= MAXTTYS) { fprintf(stderr, "ps: tty table overflow\n"); exit(1); } dp = &allttys[nttys++]; (void)strcpy(dp->name, cp); if (stat(dp->name, &stb) == 0 && (stb.st_mode & S_IFMT) == S_IFCHR) dp->ttyd = stb.st_rdev; else dp->ttyd = -1; } void getdev() { register DIR *df; register struct direct *dbuf; if (chdir("/dev") < 0) { perror("/dev"); exit(1); } if ((df = opendir(".")) == NULL) { fprintf(stderr, "Can't open . in /dev\n"); exit(1); } while ((dbuf = readdir(df))) maybetty(dbuf->d_name); closedir(df); } char * gettty() { register int tty_step; register char *p; if (u.u_ttyp) { for (tty_step = 0; tty_step < nttys; ++tty_step) { if (allttys[tty_step].ttyd == u.u_ttyd) { p = allttys[tty_step].name; if (strncmp(p, "tty", 3) == 0) p += 3; return(p); } } } return("?"); } unsigned getptr(adr) off_t adr; { unsigned ptr = 0; if (lseek(file, adr, 0) == (off_t) -1 || read (file, &ptr, sizeof(ptr)) != sizeof(ptr)) return 0; return ptr; } int getbyte(adr) register char *adr; { char b; if (lseek(file, (off_t) adr, 0) == (off_t) -1 || read (file, &b, 1) < 1) return(0); return((unsigned) b); } int getcmd(a, addr) off_t addr; register struct psout *a; { /* amount of top of stack to examine for args */ #define ARGLIST (DEV_BSIZE * 2) char abuf [ARGLIST]; char cmd[82], *bp; off_t ap; unsigned ssize, cp; /* in case of early return */ bp = a->o_args; strcat(bp, " ("); strcat(bp, u.u_comm); strcat(bp, ")"); bp[63] = 0; /* max room in psout is 64 chars */ if (mproc->p_pid == 0) return(1); /* look for in-core process */ if (mproc->p_flag & SLOAD) { addr += mproc->p_ssize; /* file offset to top of stack */ lseek(file, addr - sizeof (char **), 0); if (read(file, (char *) &ap, sizeof (char *)) != sizeof (char *)) return (1); if (ap == 0) return(1); bp = cmd; while (bp < cmd + sizeof(a->o_args)) { int c, nbad = 0; cp = getptr(ap); if (! cp) break; ap += sizeof(char*); while ((c = getbyte(cp++)) && bp < cmd + sizeof (a->o_args)) { if (c < ' ' || c > '~') { if (nbad++ > 3) break; continue; } *bp++ = c; } *bp++ = ' '; } *bp++ = 0; strcpy(a->o_args, cmd); return(1); } /* process is swapped out */ ssize = mproc->p_ssize; if (ssize <= sizeof(abuf)) { lseek(file, addr, 0); if (read(file, abuf, ssize) != ssize) return (1); } else { /* skip some blocks of stack */ ssize = (ssize % DEV_BSIZE) + DEV_BSIZE; addr += mproc->p_ssize - ssize; lseek(file, addr, 0); if (read(file, abuf, sizeof(abuf)) != sizeof(abuf)) return (1); } ap = *(unsigned*) &abuf[ssize - sizeof(unsigned)]; if (ap == 0) return(1); bp = cmd; while (bp < cmd + sizeof(a->o_args)) { int i, c, nbad = 0; i = ap + ssize - USER_DATA_END; if ((i & 3) || i < 0 || i >= ssize) break; cp = *(unsigned*) &abuf[i]; if (! cp) break; ap += sizeof(char*); while (bp < cmd + sizeof (a->o_args)) { i = cp++ + ssize - USER_DATA_END; if (i < 0 || i >= ssize) break; c = abuf[i]; if (! c) break; if (c < ' ' || c > '~') { if (nbad++ > 3) break; continue; } *bp++ = c; } *bp++ = ' '; } *bp++ = 0; if (cmd[0] > ' ' && (cmd[0] != '-' || cmd[1] > ' ')) strcpy(a->o_args, cmd); if (xflg || gflg || tptr || cmd[0] != '-') return(1); return(0); } /* * Save command data to outargs[]. * Return 1 on success. */ int savcom(puid) int puid; { char *tp; off_t addr; off_t daddr, saddr; register struct psout *a; register struct proc *procp = mproc; register struct user *up = &u; long txtsiz, datsiz, stksiz; if (procp->p_flag & SLOAD) { addr = procp->p_addr; daddr = procp->p_daddr; saddr = procp->p_saddr; file = mem; } else { addr = (off_t)procp->p_addr * DEV_BSIZE; daddr = (off_t)procp->p_daddr * DEV_BSIZE; saddr = (off_t)procp->p_saddr * DEV_BSIZE; file = swap; } lseek(file, addr, 0); if (read(file, (char *) up, sizeof (u)) != sizeof (u)) return(0); txtsiz = up->u_tsize; /* set up address maps for user pcs */ datsiz = up->u_dsize; stksiz = up->u_ssize; datmap.b1 = txtsiz; datmap.e1 = datmap.b1 + datsiz; datmap.f1 = daddr; datmap.f2 = saddr; datmap.b2 = stackbas(stksiz); datmap.e2 = stacktop(stksiz); tp = gettty(); if ((tptr && strncmp(tptr, tp, 2) != 0) || (! aflg && strncmp(mytty, tp, 2) != 0)) return(0); a = &outargs[npr]; /* saving com starts here */ a->o_uid = puid; a->o_pid = procp->p_pid; a->o_flag = procp->p_flag; a->o_ppid = procp->p_ppid; a->o_cpu = procp->p_cpu; a->o_pri = procp->p_pri; a->o_nice = procp->p_nice; a->o_addr0 = procp->p_addr; a->o_size = (procp->p_dsize + procp->p_ssize + USIZE) / DEV_BSIZE; a->o_wchan = procp->p_wchan; a->o_pgrp = procp->p_pgrp; strncpy(a->o_tty, tp, sizeof (a->o_tty)); a->o_ttyd = tp[0] == '?' ? -1 : up->u_ttyd; a->o_stat = procp->p_stat; a->o_flag = procp->p_flag; if (a->o_stat == SZOMB) return(1); a->o_utime = up->u_ru.ru_utime; a->o_stime = up->u_ru.ru_stime; a->o_cutime = up->u_cru.ru_utime; a->o_cstime = up->u_cru.ru_stime; a->o_sigs = (int)up->u_signal[SIGINT] + (int)up->u_signal[SIGQUIT]; a->o_uname[0] = 0; strncpy(a->o_comm, up->u_comm, MAXCOMLEN); if (cflg) return (1); else return getcmd(a, saddr); } int pscomp(x1, x2) register struct psout *x1, *x2; { register int c; c = (x1)->o_ttyd - (x2)->o_ttyd; if (c == 0) c = (x1)->o_pid - (x2)->o_pid; return(c); } /* * fixup figures out everybodys name and sorts into a nice order. */ void fixup(np) register int np; { register int i; register struct passwd *pw; if (uflg) { setpwent(); /* * If we want names, traverse the password file. For each * passwd entry, look for it in the processes. * In case of multiple entries in the password file we believe * the first one (same thing ls does). */ while ((pw = getpwent()) != (struct passwd *) NULL) { for (i = 0; i < np; i++) if (outargs[i].o_uid == pw->pw_uid) { if (outargs[i].o_uname[0] == 0) strcpy(outargs[i].o_uname, pw->pw_name); } } endpwent(); } qsort(outargs, np, sizeof (outargs[0]), pscomp); } int wchancomp(x1, x2) register WCHAN *x1, *x2; { if (x1->caddr > x2->caddr) return(1); else if (x1->caddr == x2->caddr) return(0); else return(-1); } void addchan(name, caddr) char *name; unsigned caddr; { static int left = 0; register WCHAN *wp; if (left == 0) { if (wchand) { left = 50; wchand = (WCHAN *)realloc(wchand, (nchans + left) * sizeof (struct wchan)); } else { left = 300; wchand = (WCHAN *)malloc(left * sizeof (struct wchan)); } if (! wchand) { fprintf(stderr, "ps: out of wait channel memory\n"); nflg++; return; } } wp = &wchand[nchans++]; left--; strncpy(wp->cname, name, NNAMESIZ - 1); wp->cname[NNAMESIZ-1] = '\0'; wp->caddr = caddr; } char * getchan(chan) register unsigned int chan; { register int i; register char *prevsym; prevsym = ""; if (chan) { for (i = 0; i < nchans; i++) { if (wchand[i].caddr > chan) return (prevsym); prevsym = wchand[i].cname; } } return(prevsym); } void perrexit(msg) char *msg; { perror(msg); exit(1); } void openfiles(argc, argv) char **argv; { if (kflg) kmemf = argc > 1 ? argv[1] : _PATH_CORE; kmem = open(kmemf, 0); if (kmem < 0) perrexit(kmemf); if (!kflg) memf = _PATH_MEM; else memf = kmemf; mem = open(memf, 0); if (mem < 0) perrexit(memf); swapf = argc > 2 ? argv[2] : _PATH_SWAP; swap = open(swapf, 0); if (swap < 0) perrexit(swapf); } void getkvars(argc,argv) int argc; char **argv; { knlist(nl); if (! nflg) { int i; for (i=0; i<sizeof(nl)/sizeof(*nl); i++) { if (nl[i].n_value != 0) addchan(nl[i].n_name + 1, nl[i].n_value); } qsort(wchand, nchans, sizeof(WCHAN), wchancomp); } getdev(); /* find number of procs */ if (nl[X_NPROC].n_value) { int ret = lseek(kmem, (off_t)nl[X_NPROC].n_value, 0); if (ret == -1 || read(kmem, (char *)&nproc, sizeof(nproc)) != sizeof(nproc)) { perror(kmemf); exit(1); } } else { fputs("nproc not in namelist\n", stderr); exit(1); } outargs = (struct psout *)calloc(nproc, sizeof(struct psout)); if (!outargs) { fputs("ps: not enough memory for saving info\n", stderr); exit(1); } /* find value of hz */ lseek(kmem, (off_t)nl[X_HZ].n_value, 0); read(kmem, (char *)&hz, sizeof(hz)); } void ptime(a) struct psout *a; { time_t tm; tm = (a->o_utime + a->o_stime + 30) / hz; printf("%3ld:",tm / 60); tm %= 60; printf(tm < 10 ? "0%ld" : "%ld",tm); } char *uhdr = "USER PID NICE SZ TTY TIME"; void upr(a) register struct psout *a; { printf("%-8.8s%6u%4d%4d %-3.3s",a->o_uname,a->o_pid,a->o_nice,a->o_size,a->o_tty); ptime(a); } char *shdr = " PID TTY TIME"; void spr (a) register struct psout *a; { printf("%6u %-3.3s",a->o_pid,a->o_tty); ptime(a); } char *lhdr = " F S UID PID PPID CPU PRI NICE ADDR SZ WCHAN TTY TIME"; void lpr(a) register struct psout *a; { static char clist[] = "0SWRIZT"; printf("%3o %c%6u%6u%6u%4d%4d%4d%#7x%4d", 0377 & a->o_flag, clist[(unsigned char)a->o_stat], a->o_uid, a->o_pid, a->o_ppid, a->o_cpu & 0377, a->o_pri, a->o_nice, a->o_addr0, a->o_size); if (nflg) if (a->o_wchan) printf("%*.*x", NNAMESIZ, NNAMESIZ, (unsigned) a->o_wchan); else fputs(" ", stdout); else printf(" %-*.*s",NNAMESIZ, NNAMESIZ, getchan(a->o_wchan)); printf(" %-3.3s",a->o_tty); ptime(a); } void printhdr() { register char *hdr, *cmdstr = " COMMAND"; if (rflg) return; if (lflg && uflg) { fputs("ps: specify only one of l and u.\n",stderr); exit(1); } hdr = lflg ? lhdr : (uflg ? uhdr : shdr); fputs(hdr,stdout); cmdstart = strlen(hdr); if (cmdstart + strlen(cmdstr) >= twidth) cmdstr = " CMD"; printf("%s\n", cmdstr); fflush(stdout); } int main (argc, argv) char **argv; { int uid, euid, puid, nread; register int i, j; char *ap; register struct proc *procp; if ((ioctl(fileno(stdout), TIOCGWINSZ, &ws) != -1 && ioctl(fileno(stderr), TIOCGWINSZ, &ws) != -1 && ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) || ws.ws_col == 0) twidth = 80; else twidth = ws.ws_col; mytty = ttyname(0); argc--, argv++; if (argc > 0) { ap = argv [0]; while (*ap) switch (*ap++) { case '-': break; case 'a': aflg++; break; case 'c': cflg++; break; case 'g': gflg++; break; case 'k': kflg++; break; case 'l': lflg = 1; break; case 'n': nflg++; lflg = 1; break; case 'r': rflg++; break; case 't': if (*ap) { tptr = ap; } else if (! mytty) { /* Stdin is not a tty - 't' flag ignored. */ break; } else { tptr = mytty; if (strncmp(tptr, "/dev/", 5) == 0) tptr += 5; } if (strncmp(tptr, "tty", 3) == 0) tptr += 3; aflg++; gflg++; if (tptr && *tptr == '?') xflg++; while (*ap) ap++; break; case 'u': uflg = 1; break; case 'w': if (wflg) twidth = BUFSIZ; else if (twidth < 132) twidth = 132; wflg++; break; case 'x': xflg++; break; default: if (!isdigit(ap[-1])) break; chkpid = atoi(--ap); *ap = '\0'; aflg++; xflg++; break; } } openfiles(argc, argv); getkvars(argc, argv); lseek(kmem, (off_t)nl[X_PROC].n_value, 0); uid = getuid(); euid = geteuid(); /* handle case where ps is in background and ttyname returns 0 */ if (!mytty) mytty = ""; if (!strncmp(mytty,"/dev/",5)) mytty += 5; if (!strncmp(mytty,"tty",3)) mytty += 3; printhdr(); for (i = 0; i < nproc; i += 8) { j = nproc - i; if (j > 8) j = 8; j *= sizeof (struct proc); if ((nread = read(kmem, (char *) proc, j)) != j) { fprintf(stderr, "ps: error reading proc table from %s\n", kmemf); if (nread == -1) break; } for (j = nread / sizeof (struct proc) - 1; j >= 0; j--) { mproc = &proc[j]; procp = mproc; /* skip processes that don't exist */ if (procp->p_stat == 0) continue; /* skip those without a tty unless -x */ if (procp->p_pgrp == 0 && xflg == 0) continue; /* skip group leaders on a tty unless -g, -x, or -t.. */ if (!tptr && !gflg && !xflg && procp->p_ppid == 1) continue; /* -g also skips those where **argv is "-" - see savcom */ puid = procp->p_uid; /* skip other peoples processes unless -a or a specific pid */ if ((uid != puid && euid != puid && aflg == 0) || (chkpid != 0 && chkpid != procp->p_pid)) continue; if (savcom(puid)) npr++; } } fixup(npr); for (i = 0; i < npr; i++) { register int cmdwidth = twidth - cmdstart - 2; register struct psout *a = &outargs[i]; if (rflg) { if (write(1, (char *) a, sizeof (*a)) != sizeof (*a)) perror("write"); continue; } else if (lflg) lpr(a); else if (uflg) upr(a); else spr(a); if (cmdwidth < 0) cmdwidth = 80 - cmdstart - 2; if (a->o_stat == SZOMB) printf("%.*s", cmdwidth, " <defunct>"); else if (a->o_pid == 0) printf("%.*s", cmdwidth, " swapper"); else printf(" %.*s", twidth - cmdstart - 2, cflg ? a->o_comm : a->o_args); putchar('\n'); } exit(!npr); }
f24b46d0091533e5b9e5674f270926848084e4bb
aa0df7e1109c8ebc456bffb15c88c7285a94ed02
/SRC/FILLERS.C
c132e6e551f2f1de97b240b794ed878f6a8d476c
[ "MIT" ]
permissive
kondrak/dos3d
30dee3bccd925918ccba85e0d2f0e198e63b6ace
913a58b017264ac8af9370024b8bf6302873f59b
refs/heads/master
2021-01-12T03:59:03.062354
2020-08-18T21:20:29
2020-08-18T21:20:29
81,683,043
129
10
null
2017-07-07T21:15:28
2017-02-11T21:19:14
C
UTF-8
C
false
false
11,538
c
FILLERS.C
#include "src/fillers.h" #include "src/utils.h" #include <memory.h> /* ***** */ void gfx_wireFrame(const gfx_Triangle *t, gfx_drawBuffer *target) { gfx_drawLine(t->vertices[0].position.x, t->vertices[0].position.y, t->vertices[0].position.z, t->vertices[1].position.x, t->vertices[1].position.y, t->vertices[1].position.z, t->color, target); gfx_drawLine(t->vertices[1].position.x, t->vertices[1].position.y, t->vertices[1].position.z, t->vertices[2].position.x, t->vertices[2].position.y, t->vertices[2].position.z, t->color, target); gfx_drawLine(t->vertices[2].position.x, t->vertices[2].position.y, t->vertices[2].position.z, t->vertices[0].position.x, t->vertices[0].position.y, t->vertices[0].position.z, t->color, target); } /* ***** */ void gfx_flatFill(const gfx_Triangle *t, gfx_drawBuffer *target, enum TriangleType type) { const gfx_Vertex *v0 = &t->vertices[0]; const gfx_Vertex *v1 = &t->vertices[1]; const gfx_Vertex *v2 = &t->vertices[2]; double y, invDy, dxLeft, dxRight, xLeft, xRight, prestep; int currLine, numScanlines, x0, x1, yDir = 1; // variables used if depth test is enabled float startInvZ, endInvZ, invZ0, invZ1, invZ2, invY02; if(type == FLAT_BOTTOM) { invDy = 1.0 / (v2->position.y - v0->position.y); numScanlines = ceil(v2->position.y) - ceil(v0->position.y); prestep = ceil(v0->position.y) - v0->position.y; // todo: handle line sizes of height < 1 if(v2->position.y - v0->position.y < 1) return; } else { invDy = 1.0 / (v0->position.y - v2->position.y); yDir = -1; numScanlines = ceil(v0->position.y) - ceil(v2->position.y); prestep = ceil(v2->position.y) - v2->position.y; // todo: handle line sizes of height < 1 if(v0->position.y - v2->position.y < 1) return; } dxLeft = (v2->position.x - v0->position.x) * invDy; dxRight = (v1->position.x - v0->position.x) * invDy; xLeft = v0->position.x + dxLeft * prestep; xRight = v0->position.x + dxRight * prestep; // skip unnecessary divisions if there's no depth testing if(target->drawOpts.depthFunc != DF_ALWAYS) { invZ0 = 1.f / v0->position.z; invZ1 = 1.f / v1->position.z; invZ2 = 1.f / v2->position.z; invY02 = 1.f / (v0->position.y - v2->position.y); } for(currLine = 0, y = ceil(v0->position.y); currLine <= numScanlines; y += yDir) { x0 = ceil(xLeft); x1 = ceil(xRight); // interpolate 1/z only if depth testing is enabled if(target->drawOpts.depthFunc != DF_ALWAYS) { float r1 = (v0->position.y - y) * invY02; startInvZ = LERP(invZ0, invZ2, r1); endInvZ = LERP(invZ0, invZ1, r1); gfx_drawLine(x0, y, 1.f/startInvZ, x1, y, 1.f/endInvZ, t->color, target); } else { if(x0 > x1) SWAP(x0, x1); memset(target->colorBuffer + x0 + (int)y * target->width, t->color, sizeof(uint8_t) * (x1 - x0 + 1)); } if(++currLine < numScanlines) { xLeft += dxLeft; xRight += dxRight; } } } /* ***** */ void gfx_perspectiveTextureMap(const gfx_Triangle *t, gfx_drawBuffer *target, enum TriangleType type) { const gfx_Vertex *v0 = &t->vertices[0]; const gfx_Vertex *v1 = &t->vertices[1]; const gfx_Vertex *v2 = &t->vertices[2]; double x, y, invDy, dxLeft, dxRight, prestep, yDir = 1; double startX, endX, startXPrestep, endXPrestep, lineLength; int useColorKey = target->drawOpts.colorKey >= 0 ? 1 : 0; int texW = t->texture->width - 1; int texH = t->texture->height - 1; int texArea = texW * texH; int currLine, numScanlines; float invZ0, invZ1, invZ2, invY02 = 1.f; if(type == FLAT_BOTTOM) { invDy = 1.0 / (v2->position.y - v0->position.y); numScanlines = ceil(v2->position.y) - ceil(v0->position.y); prestep = ceil(v0->position.y) - v0->position.y; // todo: handle line sizes of height < 1 if(v2->position.y - v0->position.y < 1) return; } else { invDy = 1.0 / (v0->position.y - v2->position.y); yDir = -1; numScanlines = ceil(v0->position.y) - ceil(v2->position.y); prestep = ceil(v2->position.y) - v2->position.y; // todo: handle line sizes of height < 1 if(v0->position.y - v2->position.y < 1) return; } dxLeft = (v2->position.x - v0->position.x) * invDy; dxRight = (v1->position.x - v0->position.x) * invDy; startX = v0->position.x; endX = startX; startXPrestep = v0->position.x + dxLeft * prestep; endXPrestep = v0->position.x + dxRight * prestep; invZ0 = 1.f / v0->position.z; invZ1 = 1.f / v1->position.z; invZ2 = 1.f / v2->position.z; invY02 = 1.f / (v0->position.y - v2->position.y); for(currLine = 0, y = v0->position.y; currLine <= numScanlines; y += yDir) { float startInvZ, endInvZ, r1, invLineLength; float startU = texW, startV = texH, endU = texW, endV = texH; lineLength = endX - startX; r1 = (v0->position.y - y) * invY02; startInvZ = LERP(invZ0, invZ2, r1); endInvZ = LERP(invZ0, invZ1, r1); startU *= LERP(v0->uv.u * invZ0, v2->uv.u * invZ2, r1); startV *= LERP(v0->uv.v * invZ0, v2->uv.v * invZ2, r1); endU *= LERP(v0->uv.u * invZ0, v1->uv.u * invZ1, r1); endV *= LERP(v0->uv.v * invZ0, v1->uv.v * invZ1, r1); // skip zero-length lines if(lineLength > 0) { invLineLength = 1.f / lineLength; for(x = startXPrestep; x <= endXPrestep; ++x) { // interpolate 1/z for each pixel in the scanline float r = (x - startX) * invLineLength; float lerpInvZ = LERP(startInvZ, endInvZ, r); float z = 1.f/lerpInvZ; float u = MAX(0, z * LERP(startU, endU, r)); float v = MAX(0, z * LERP(startV, endV, r)); // fetch texture data with a texArea modulus for proper effect in case u or v are > 1 uint8_t pixel = t->texture->data[((uint16_t)u + (uint16_t)v * t->texture->height) % texArea]; if(!useColorKey || (useColorKey && pixel != (uint8_t)target->drawOpts.colorKey)) { // DF_ALWAYS = no depth test if(target->drawOpts.depthFunc == DF_ALWAYS) gfx_drawPixel(ceil(x), ceil(y), pixel, target); else gfx_drawPixelWithDepth(ceil(x), ceil(y), lerpInvZ, pixel, target); } } } startX += dxLeft; endX += dxRight; if(++currLine < numScanlines) { startXPrestep += dxLeft; endXPrestep += dxRight; } } } /* ***** */ void gfx_affineTextureMap(const gfx_Triangle *t, gfx_drawBuffer *target, enum TriangleType type) { const gfx_Vertex *v0 = &t->vertices[0]; const gfx_Vertex *v1 = &t->vertices[1]; const gfx_Vertex *v2 = &t->vertices[2]; double x, y, invDy, dxLeft, dxRight, prestep, yDir = 1; double startU, startV, invDx, du, dv, lineLength; double startX, endX, startXPrestep, endXPrestep; float duLeft, dvLeft, duRight, dvRight; float texW = t->texture->width - 1; float texH = t->texture->height - 1; int useColorKey = target->drawOpts.colorKey >= 0 ? 1 : 0; int texArea = texW * texH; int currLine, numScanlines; // variables used only if depth test is enabled float invZ0, invZ1, invZ2, invY02 = 1.f; if(type == FLAT_BOTTOM) { invDy = 1.f / (v2->position.y - v0->position.y); numScanlines = ceil(v2->position.y) - ceil(v0->position.y); prestep = ceil(v0->position.y) - v0->position.y; // todo: handle line sizes of height < 1 if(v2->position.y - v0->position.y < 1) return; } else { invDy = 1.f / (v0->position.y - v2->position.y); yDir = -1; numScanlines = ceil(v0->position.y) - ceil(v2->position.y); prestep = ceil(v2->position.y) - v2->position.y; // todo: handle line sizes of height < 1 if(v0->position.y - v2->position.y < 1) return; } dxLeft = (v2->position.x - v0->position.x) * invDy; dxRight = (v1->position.x - v0->position.x) * invDy; duLeft = texW * (v2->uv.u - v0->uv.u) * invDy; dvLeft = texH * (v2->uv.v - v0->uv.v) * invDy; duRight = texW * (v1->uv.u - v0->uv.u) * invDy; dvRight = texH * (v1->uv.v - v0->uv.v) * invDy; startU = texW * v0->uv.u + duLeft * prestep; startV = texH * v0->uv.v + dvLeft * prestep; // With triangles, the texture gradients (u,v slopes over the triangle surface) // are guaranteed to be constant, so we need to calculate du and dv only once. invDx = 1.f / (dxRight - dxLeft); du = (duRight - duLeft) * invDx; dv = (dvRight - dvLeft) * invDx; startX = v0->position.x; endX = startX; startXPrestep = v0->position.x + dxLeft * prestep; endXPrestep = v0->position.x + dxRight * prestep; // skip unnecessary divisions if there's no depth testing if(target->drawOpts.depthFunc != DF_ALWAYS) { invZ0 = 1.f / v0->position.z; invZ1 = 1.f / v1->position.z; invZ2 = 1.f / v2->position.z; invY02 = 1.f / (v0->position.y - v2->position.y); } for(currLine = 0, y = v0->position.y; currLine <= numScanlines; y += yDir) { float u = startU; float v = startV; // variables used only if depth test is enabled float startInvZ, endInvZ, invLineLength; lineLength = endX - startX; // interpolate 1/z only if depth testing is enabled if(target->drawOpts.depthFunc != DF_ALWAYS) { float r1 = (v0->position.y - y) * invY02; startInvZ = LERP(invZ0, invZ2, r1); endInvZ = LERP(invZ0, invZ1, r1); if(lineLength) invLineLength = 1.f / lineLength; } // skip zero-length lines if(lineLength > 0) { for(x = startXPrestep; x <= endXPrestep; ++x) { // fetch texture data with a texArea modulus for proper effect in case u or v are > 1 uint8_t pixel = t->texture->data[((uint16_t)u + (uint16_t)v * t->texture->height) % texArea]; if(!useColorKey || (useColorKey && pixel != (uint8_t)target->drawOpts.colorKey)) { // DF_ALWAYS = no depth test if(target->drawOpts.depthFunc == DF_ALWAYS) gfx_drawPixel(ceil(x), ceil(y), pixel, target); else { float r = (x - startX) * invLineLength; float lerpInvZ = LERP(startInvZ, endInvZ, r); gfx_drawPixelWithDepth(ceil(x), ceil(y), lerpInvZ, pixel, target); } } u += du; v += dv; } } startX += dxLeft; endX += dxRight; if(++currLine < numScanlines) { startXPrestep += dxLeft; endXPrestep += dxRight; startU += duLeft; startV += dvLeft; } } }
7298ee201cd9c736c6c321edc45ce76f93de5aaf
78dc9f153549b281be709227bc9897931b06260d
/generation/WinSDK/RecompiledIdlHeaders/um/Dhcpv6cSdk.h
5b3172788d124349dde64b80923c121c30276da3
[ "MIT" ]
permissive
microsoft/win32metadata
dff35b4fe904d556162cee5133294c4498f1a79a
5bf233f04d45f7a697e112e9639722551103eb07
refs/heads/main
2023-09-01T19:51:22.972899
2023-08-30T21:39:44
2023-08-30T21:39:44
270,838,404
1,240
107
NOASSERTION
2023-09-14T18:49:44
2020-06-08T21:52:10
C++
UTF-8
C
false
false
7,409
h
Dhcpv6cSdk.h
#include <winapifamily.h> /*++ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: dhcpv6csdk.h Abstract: These are the exported dhcpv6 client api function definitions Author: Achint Setia (asetia) July-1-2005 Environment: User Mode - Win32 Revision History: --*/ #ifndef _DHCPV6CSDK_ #define _DHCPV6CSDK_ #ifdef __cplusplus extern "C" { #endif #ifndef DHCPV6_OPTIONS_DEFINED #define DHCPV6_OPTIONS_DEFINED #if _MSC_VER > 1000 #pragma once #endif #pragma region Application Family or OneCore Family #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) // // DHCPv6 Standard Options(non-encapsulated). // #define DHCPV6_OPTION_CLIENTID 1 #define DHCPV6_OPTION_SERVERID 2 #define DHCPV6_OPTION_IA_NA 3 #define DHCPV6_OPTION_IA_TA 4 #define DHCPV6_OPTION_ORO 6 #define DHCPV6_OPTION_PREFERENCE 7 #define DHCPV6_OPTION_UNICAST 12 #define DHCPV6_OPTION_RAPID_COMMIT 14 #define DHCPV6_OPTION_USER_CLASS 15 #define DHCPV6_OPTION_VENDOR_CLASS 16 #define DHCPV6_OPTION_VENDOR_OPTS 17 #define DHCPV6_OPTION_RECONF_MSG 19 #define DHCPV6_OPTION_SIP_SERVERS_NAMES 21 #define DHCPV6_OPTION_SIP_SERVERS_ADDRS 22 #define DHCPV6_OPTION_DNS_SERVERS 23 #define DHCPV6_OPTION_DOMAIN_LIST 24 #define DHCPV6_OPTION_IA_PD 25 #define DHCPV6_OPTION_NIS_SERVERS 27 #define DHCPV6_OPTION_NISP_SERVERS 28 #define DHCPV6_OPTION_NIS_DOMAIN_NAME 29 #define DHCPV6_OPTION_NISP_DOMAIN_NAME 30 #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */ #pragma endregion #endif // DHCPV6_OPTIONS_DEFINED #pragma region Application Family or OneCore Family #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) #ifndef DHCPV6API_PARAMS_DEFINED #define DHCPV6API_PARAMS_DEFINED typedef struct _DHCPV6CAPI_PARAMS { // use this structure to request params ULONG Flags; // for future use ULONG OptionId; // what option is this? BOOL IsVendor; // is this vendor specific? LPBYTE Data; // the actual data DWORD nBytesData; // how many bytes of data are there in Data? } DHCPV6CAPI_PARAMS, *PDHCPV6CAPI_PARAMS, *LPDHCPV6CAPI_PARAMS; #endif // DHCPV6API_PARAMS_DEFINED typedef struct _DHCPV6CAPI_PARAMS_ARRAY { // array of params.. ULONG nParams; // size of array LPDHCPV6CAPI_PARAMS Params; // actual array } DHCPV6CAPI_PARAMS_ARRAY, *PDHCPV6CAPI_PARAMS_ARRAY, *LPDHCPV6CAPI_PARAMS_ARRAY; typedef struct _DHCPV6CAPI_CLASSID { // defines a client class id. ULONG Flags; // must be zero currently. #ifdef __midl [size_is(nBytesData)] LPBYTE Data; #else _Field_size_bytes_(nBytesData) LPBYTE Data; // classid binary data. #endif ULONG nBytesData; // how many bytes of data are there? } DHCPV6CAPI_CLASSID, *PDHCPV6CAPI_CLASSID, *LPDHCPV6CAPI_CLASSID; #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */ #pragma endregion #pragma region Desktop Family or OneCore Family #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) typedef enum { STATUS_NO_ERROR, //Prefix successfully leased, renewed. STATUS_UNSPECIFIED_FAILURE, //Some unspecified failure occurred while trying to process the prefix. STATUS_NO_BINDING = 3, //The server doesn't have binding for the prefix. STATUS_NOPREFIX_AVAIL = 6 //The server doesn't have prefix to offer to the requesting client. }StatusCode; typedef struct _DHCPV6Prefix{ UCHAR prefix[16]; //128 bit prefix DWORD prefixLength; //(48-64 bits) DWORD preferredLifeTime; //The Preferred Lifetime of the Prefix returned or requested in seconds DWORD validLifeTime; //The Valid Lifetime of the Prefix returned or requested in seconds StatusCode status; //The status code returned by the server for the prefix }DHCPV6Prefix, *PDHCPV6Prefix, *LPDHCPV6Prefix; typedef struct _DHCPV6PrefixLeaseInformation { DWORD nPrefixes; // number of prefixes. _Field_size_(nPrefixes) LPDHCPV6Prefix prefixArray; // Array of prefixes DWORD iaid; //The 32 bit Identity Association identifier for the prefix option. time_t T1; //The absolute renewal time for the prefixes in seconds time_t T2; //The absolute rebind time for the prefixes in seconds time_t MaxLeaseExpirationTime; //The absolute maximum lease expiration time of all the prefix leases in this structure. time_t LastRenewalTime; // The absolute time at which the last renewal for the prefixes happened. StatusCode status; //The status code returned by the server for the IAPD _Field_size_bytes_(ServerIdLen) LPBYTE ServerId; // The server DUID from which the prefix is received. This is used in subsequent Renews. DWORD ServerIdLen; // The length of the above DUID data. } DHCPV6PrefixLeaseInformation, *PDHCPV6PrefixLeaseInformation, *LPDHCPV6PrefixLeaseInformation; #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */ #pragma endregion #pragma region Application Family or OneCore Family #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) VOID APIENTRY Dhcpv6CApiInitialize( OUT LPDWORD Version ); VOID APIENTRY Dhcpv6CApiCleanup( VOID ); DWORD // win32 status APIENTRY Dhcpv6RequestParams( // request parameters of client IN BOOL forceNewInform, IN LPVOID reserved, _In_ IN LPWSTR adapterName, IN LPDHCPV6CAPI_CLASSID classId, IN OUT DHCPV6CAPI_PARAMS_ARRAY recdParams, IN LPBYTE buffer, IN OUT LPDWORD pSize ); #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */ #pragma endregion #pragma region Desktop Family or OneCore Family #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) DWORD APIENTRY Dhcpv6RequestPrefix( IN _In_ LPWSTR adapterName, IN LPDHCPV6CAPI_CLASSID pclassId, IN OUT LPDHCPV6PrefixLeaseInformation prefixleaseInfo, _Out_ DWORD* pdwTimeToWait ); DWORD APIENTRY Dhcpv6RenewPrefix( IN _In_ LPWSTR adapterName, IN LPDHCPV6CAPI_CLASSID pclassId, IN OUT LPDHCPV6PrefixLeaseInformation prefixleaseInfo, _Out_ DWORD* pdwTimeToWait, IN DWORD bValidatePrefix ); DWORD APIENTRY Dhcpv6ReleasePrefix( _In_ IN LPWSTR adapterName, IN LPDHCPV6CAPI_CLASSID classId, IN LPDHCPV6PrefixLeaseInformation leaseInfo ); #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */ #pragma endregion #ifdef __cplusplus } #endif //================================================================================ // end of file //================================================================================ #endif // _DHCPV6CSDK_
77502beceb7828a9065ef75cc98f69461d55c825
0744dcc5394cebf57ebcba343747af6871b67017
/external/audiocodec/mp3dec/pvmp3_mdct_6.c
5f474eb09f48371a4c7a8ca08828fba41cb37db8
[ "MIT", "Apache-2.0" ]
permissive
Samsung/TizenRT
96abf62f1853f61fcf91ff14671a5e0c6ca48fdb
1a5c2e00a4b1bbf4c505bbf5cc6a8259e926f686
refs/heads/master
2023-08-31T08:59:33.327998
2023-08-08T06:09:20
2023-08-31T04:38:20
82,517,252
590
719
Apache-2.0
2023-09-14T06:54:49
2017-02-20T04:38:30
C
UTF-8
C
false
false
5,957
c
pvmp3_mdct_6.c
/****************************************************************** * * Copyright 2018 Samsung Electronics All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************/ /* ------------------------------------------------------------------ * Copyright (C) 1998-2009 PacketVideo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. * See the License for the specific language governing permissions * and limitations under the License. * ------------------------------------------------------------------- */ /* ------------------------------------------------------------------------------ PacketVideo Corp. MP3 Decoder Library Filename: mdct_18.cpp Date: 09/21/2007 ------------------------------------------------------------------------------ REVISION HISTORY Description: ------------------------------------------------------------------------------ INPUT AND OUTPUT DEFINITIONS Input int32 vec[], input vector of length 6 int32 *history input for overlap and add, vector updated with next overlap and add values Returns none mdct computation in-place ------------------------------------------------------------------------------ FUNCTION DESCRIPTION Returns the mdct of length 6 of the input vector, as well as the overlap vector for next iteration ( on history[]) ------------------------------------------------------------------------------ REQUIREMENTS ------------------------------------------------------------------------------ REFERENCES ------------------------------------------------------------------------------ PSEUDO-CODE ------------------------------------------------------------------------------ */ /*---------------------------------------------------------------------------- ; INCLUDES ----------------------------------------------------------------------------*/ #include "pv_mp3dec_fxd_op.h" #include "pvmp3_mdct_6.h" /*---------------------------------------------------------------------------- ; MACROS ; Define module specific macros here ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; DEFINES ; Include all pre-processor statements here. Include conditional ; compile variables also. ----------------------------------------------------------------------------*/ #define QFORMAT 29 #define Qfmt29(a) (int32)((a)*((int32)1<<QFORMAT) + ((a)>=0?0.5F:-0.5F)) /*---------------------------------------------------------------------------- ; LOCAL FUNCTION DEFINITIONS ; Function Prototype declaration ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; LOCAL STORE/BUFFER/POINTER DEFINITIONS ; Variable declaration - defined here and used outside this module ----------------------------------------------------------------------------*/ /* * (1./(2*cos((pi/(2*N))*(2*i+1)))), N = 12, i = [0:N/2-1] */ const int32 cosTerms_1_ov_cos_phi_N6[6] = { Qfmt29(0.50431448029008f), Qfmt29(0.54119610014620f), Qfmt29(0.63023620700513f), Qfmt29(0.82133981585229f), Qfmt29(1.30656296487638f), Qfmt29(3.83064878777019f) }; /*---------------------------------------------------------------------------- ; EXTERNAL FUNCTION REFERENCES ; Declare functions defined elsewhere and referenced in this module ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES ; Declare variables used in this module but defined elsewhere ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; FUNCTION CODE ----------------------------------------------------------------------------*/ void pvmp3_mdct_6(int32 vec[], int32 *history) { int32 i; int32 tmp; int32 tmp1; int32 tmp2; int32 *pt_vec = vec; int32 *pt_vec_o = vec; const int32 *pt_cos = cosTerms_1_ov_cos_phi_N6; for (i = 2; i != 0; i--) { tmp = *(pt_vec++); tmp1 = *(pt_vec++); tmp2 = *(pt_vec++); *(pt_vec_o++) = fxp_mul32_Q29(tmp, *(pt_cos++)); *(pt_vec_o++) = fxp_mul32_Q29(tmp1, *(pt_cos++)); *(pt_vec_o++) = fxp_mul32_Q29(tmp2, *(pt_cos++)); } pvmp3_dct_6(vec); // Even terms tmp = -(vec[0] + vec[1]); history[3] = tmp; history[2] = tmp; tmp = -(vec[1] + vec[2]); vec[0] = vec[3] + vec[4]; vec[1] = vec[4] + vec[5]; history[4] = tmp; history[1] = tmp; tmp = -(vec[2] + vec[3]); vec[4] = -vec[1]; history[5] = tmp; history[0] = tmp; vec[2] = vec[5]; vec[3] = -vec[5]; vec[5] = -vec[0]; }
1d8cb2333f9e67984780100c9fe5000e1d1ae69f
f367e4b66a1ee42e85830b31df88f63723c36a47
/lib/monkey/mk_core/deps/libevent/evutil_rand.c
046a14b07a9a637b2096cd95f129e38dd1196685
[ "BSD-3-Clause", "MIT", "ISC", "Apache-2.0" ]
permissive
fluent/fluent-bit
06873e441162b92941024e9a7e9e8fc934150bf7
1a41f49dc2f3ae31a780caa9ffd6137b1d703065
refs/heads/master
2023-09-05T13:44:55.347372
2023-09-05T10:14:33
2023-09-05T10:14:33
29,933,948
4,907
1,565
Apache-2.0
2023-09-14T10:17:02
2015-01-27T20:41:52
C
UTF-8
C
false
false
5,289
c
evutil_rand.c
/* * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* This file has our secure PRNG code. On platforms that have arc4random(), * we just use that. Otherwise, we include arc4random.c as a bunch of static * functions, and wrap it lightly. We don't expose the arc4random*() APIs * because A) they aren't in our namespace, and B) it's not nice to name your * APIs after their implementations. We keep them in a separate file * so that other people can rip it out and use it for whatever. */ #include "event2/event-config.h" #include "evconfig-private.h" #include <limits.h> #include "util-internal.h" #include "evthread-internal.h" #ifdef EVENT__HAVE_ARC4RANDOM #include <stdlib.h> #include <string.h> int evutil_secure_rng_set_urandom_device_file(char *fname) { (void) fname; return -1; } int evutil_secure_rng_init(void) { /* call arc4random() now to force it to self-initialize */ (void) arc4random(); return 0; } #ifndef EVENT__DISABLE_THREAD_SUPPORT int evutil_secure_rng_global_setup_locks_(const int enable_locks) { return 0; } #endif static void evutil_free_secure_rng_globals_locks(void) { } static void ev_arc4random_buf(void *buf, size_t n) { #if defined(EVENT__HAVE_ARC4RANDOM_BUF) && !defined(__APPLE__) arc4random_buf(buf, n); return; #else unsigned char *b = buf; #if defined(EVENT__HAVE_ARC4RANDOM_BUF) /* OSX 10.7 introducd arc4random_buf, so if you build your program * there, you'll get surprised when older versions of OSX fail to run. * To solve this, we can check whether the function pointer is set, * and fall back otherwise. (OSX does this using some linker * trickery.) */ { void (*tptr)(void *,size_t) = (void (*)(void*,size_t))arc4random_buf; if (tptr != NULL) { arc4random_buf(buf, n); return; } } #endif /* Make sure that we start out with b at a 4-byte alignment; plenty * of CPUs care about this for 32-bit access. */ if (n >= 4 && ((ev_uintptr_t)b) & 3) { ev_uint32_t u = arc4random(); int n_bytes = 4 - (((ev_uintptr_t)b) & 3); memcpy(b, &u, n_bytes); b += n_bytes; n -= n_bytes; } while (n >= 4) { *(ev_uint32_t*)b = arc4random(); b += 4; n -= 4; } if (n) { ev_uint32_t u = arc4random(); memcpy(b, &u, n); } #endif } #else /* !EVENT__HAVE_ARC4RANDOM { */ #ifdef EVENT__ssize_t #define ssize_t EVENT__ssize_t #endif #define ARC4RANDOM_EXPORT static #define ARC4_LOCK_() EVLOCK_LOCK(arc4rand_lock, 0) #define ARC4_UNLOCK_() EVLOCK_UNLOCK(arc4rand_lock, 0) #ifndef EVENT__DISABLE_THREAD_SUPPORT static void *arc4rand_lock; #endif #define ARC4RANDOM_UINT32 ev_uint32_t #define ARC4RANDOM_NOSTIR #define ARC4RANDOM_NORANDOM #define ARC4RANDOM_NOUNIFORM #include "./arc4random.c" #ifndef EVENT__DISABLE_THREAD_SUPPORT int evutil_secure_rng_global_setup_locks_(const int enable_locks) { EVTHREAD_SETUP_GLOBAL_LOCK(arc4rand_lock, 0); return 0; } #endif static void evutil_free_secure_rng_globals_locks(void) { #ifndef EVENT__DISABLE_THREAD_SUPPORT if (arc4rand_lock != NULL) { EVTHREAD_FREE_LOCK(arc4rand_lock, 0); arc4rand_lock = NULL; } #endif return; } int evutil_secure_rng_set_urandom_device_file(char *fname) { #ifdef TRY_SEED_URANDOM ARC4_LOCK_(); arc4random_urandom_filename = fname; ARC4_UNLOCK_(); #endif return 0; } int evutil_secure_rng_init(void) { int val; ARC4_LOCK_(); if (!arc4_seeded_ok) arc4_stir(); val = arc4_seeded_ok ? 0 : -1; ARC4_UNLOCK_(); return val; } static void ev_arc4random_buf(void *buf, size_t n) { arc4random_buf(buf, n); } #endif /* } !EVENT__HAVE_ARC4RANDOM */ void evutil_secure_rng_get_bytes(void *buf, size_t n) { ev_arc4random_buf(buf, n); } void evutil_secure_rng_add_bytes(const char *buf, size_t n) { arc4random_addrandom((unsigned char*)buf, n>(size_t)INT_MAX ? INT_MAX : (int)n); } void evutil_free_secure_rng_globals_(void) { evutil_free_secure_rng_globals_locks(); }
cefea144a611891e280d5dce9cb9a5250608166c
99bdb3251fecee538e0630f15f6574054dfc1468
/bsp/gd32105c-eval/Libraries/GD32F10x_usbfs_driver/Source/usbd_core.c
366b1bbb3bbe4287ed53577f09cdfc55695a68e7
[ "Zlib", "LicenseRef-scancode-proprietary-license", "MIT", "BSD-3-Clause", "X11", "BSD-4-Clause-UC", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
14,165
c
usbd_core.c
/*! \file usbd_core.c \brief USB device mode core driver \version 2014-12-26, V1.0.0, firmware for GD32F10x \version 2017-06-20, V2.0.0, firmware for GD32F10x \version 2018-07-31, V2.1.0, firmware for GD32F10x */ /* Copyright (c) 2018, GigaDevice Semiconductor Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "usbd_core.h" #include "usbd_std.h" /*! \brief initailizes the USB device-mode handler stack \param[in] pudev: pointer to usb device instance \param[in] core_id: USB core ID \param[out] none \retval none */ void usbd_init (usb_core_handle_struct *pudev, usb_core_id_enum core_id) { /* select USB core */ usb_core_select (pudev, core_id); pudev->dev.status = USB_STATUS_DEFAULT; /* disable USB global interrupt */ USB_GLOBAL_INT_DISABLE(); /* init the core (common init.) */ usb_core_init(pudev); /* force device mode*/ usb_mode_set(pudev, DEVICE_MODE); /* set device disconnect */ USB_SOFT_DISCONNECT_ENABLE(); if ((void *)0 != pudev->mdelay) { pudev->mdelay(3U); } /* init device */ usb_devcore_init(pudev); /* set device Connect */ USB_SOFT_DISCONNECT_DISABLE(); if ((void *)0 != pudev->mdelay) { pudev->mdelay(3U); } /* enable USB global interrupt */ USB_GLOBAL_INT_ENABLE(); } /*! \brief endpoint initialization \param[in] pudev: pointer to usb device instance \param[in] ep_desc: pointer to usb endpoint descriptor \param[out] none \retval none */ void usbd_ep_init (usb_core_handle_struct *pudev, const usb_descriptor_endpoint_struct *ep_desc) { usb_ep_struct *ep; usb_dir_enum ep_dir; uint32_t devepinten = 0U; uint32_t devepctl = 0U; uint8_t ep_num = ep_desc->bEndpointAddress & 0x7FU; uint8_t ep_type = ep_desc->bmAttributes & USB_EPTYPE_MASK; uint16_t ep_mps = ep_desc->wMaxPacketSize; if (ep_desc->bEndpointAddress >> 7U) { ep = &pudev->dev.in_ep[ep_num]; devepinten |= 1U << ep_num; devepctl = USB_DIEPxCTL((uint16_t)ep_num); ep_dir = USB_TX; } else { ep = &pudev->dev.out_ep[ep_num]; devepinten |= (1U << ep_num) << 16U; devepctl = USB_DOEPxCTL((uint16_t)ep_num); ep_dir = USB_RX; } /* if the endpoint is not active, need change the endpoint control register */ if (!(devepctl & DEPCTL_EPACT)) { devepctl &= ~DEPCTL_MPL; devepctl |= ep_mps; devepctl &= ~DEPCTL_EPTYPE; devepctl |= (uint32_t)ep_type << 18U; if (USB_TX == ep_dir) { devepctl &= ~DIEPCTL_TXFNUM; devepctl |= (uint32_t)ep_num << 22U; } devepctl |= DEPCTL_SD0PID; devepctl |= DEPCTL_EPACT; } if (USB_TX == ep_dir) { USB_DIEPxCTL((uint16_t)ep_num) = devepctl; } else if (USB_RX == ep_dir) { USB_DOEPxCTL((uint16_t)ep_num) = devepctl; } else { /* no operation */ } ep->endp_mps = ep_mps; ep->endp_type = ep_type; /* enable the interrupts for this endpoint */ USB_DAEPINTEN |= devepinten; } /*! \brief endpoint deinitialize \param[in] pudev: pointer to usb device instance \param[in] ep_addr: endpoint address \param[out] none \retval none */ void usbd_ep_deinit (usb_core_handle_struct *pudev, uint8_t ep_addr) { uint32_t devepinten = 0U; uint8_t ep_num = ep_addr & 0x7FU; if (ep_addr >> 7U) { devepinten |= 1U << ep_num; USB_DIEPxCTL((uint16_t)ep_num) &= ~DEPCTL_EPACT; } else { devepinten |= (1U << ep_num) << 16U; USB_DOEPxCTL((uint16_t)ep_num) &= ~DEPCTL_EPACT; } /* disable the interrupts for this endpoint */ USB_DAEPINTEN &= ~devepinten; } /*! \brief endpoint prepare to receive data \param[in] pudev: pointer to usb device instance \param[in] ep_addr: endpoint address \param[in] pbuf: pointer to buffer \param[in] buf_len: buffer length \param[out] none \retval none */ void usbd_ep_rx (usb_core_handle_struct *pudev, uint8_t ep_addr, uint8_t *pbuf, uint16_t buf_len) { usb_ep_struct *ep; uint8_t ep_num = ep_addr & 0x7FU; uint32_t devepctl = 0U, devepxlen = 0U; ep = &pudev->dev.out_ep[ep_num]; /* setup and start the Xfer */ ep->xfer_buff = pbuf; ep->xfer_len = buf_len; ep->xfer_count = 0U; devepctl = USB_DOEPxCTL((uint16_t)ep_num); devepxlen = USB_DOEPxLEN((uint16_t)ep_num); devepxlen &= ~DEPLEN_TLEN; devepxlen &= ~DEPLEN_PCNT; /* zero length packet */ if (0U == ep->xfer_len) { /* set the transfer length to max packet size */ devepxlen |= ep->endp_mps; /* set the transfer packet count to 1 */ devepxlen |= 1U << 19U; } else { if (0U == ep_num) { /* set the transfer length to max packet size */ devepxlen |= ep->endp_mps; /* set the transfer packet count to 1 */ devepxlen |= 1U << 19U; } else { /* configure the transfer size and packet count as follows: * pktcnt = N * xfersize = N * maxpacket */ devepxlen |= ((ep->xfer_len + ep->endp_mps - 1U) / ep->endp_mps) << 19U; devepxlen |= ((devepxlen & DEPLEN_PCNT) >> 19U) * ep->endp_mps; } } USB_DOEPxLEN((uint16_t)ep_num) = devepxlen; if (USB_EPTYPE_ISOC == ep->endp_type) { if (ep->endp_frame) { devepctl |= DEPCTL_SODDFRM; } else { devepctl |= DEPCTL_SEVNFRM; } } /* enable the endpoint and clear the NAK */ devepctl |= DEPCTL_EPEN | DEPCTL_CNAK; USB_DOEPxCTL((uint16_t)ep_num) = devepctl; } /*! \brief endpoint prepare to transmit data \param[in] pudev: pointer to usb device instance \param[in] ep_addr: endpoint address \param[in] pbuf: pointer to buffer \param[in] len: buffer length \param[out] none \retval none */ void usbd_ep_tx (usb_core_handle_struct *pudev, uint8_t ep_addr, uint8_t *pbuf, uint32_t buf_len) { usb_ep_struct *ep; uint8_t ep_num = ep_addr & 0x7FU; __IO uint32_t devepctl = 0U; __IO uint32_t deveplen = 0U; ep = &pudev->dev.in_ep[ep_num]; /* setup and start the transfer */ ep->xfer_buff = pbuf; ep->xfer_len = buf_len; ep->xfer_count = 0U; devepctl = USB_DIEPxCTL((uint16_t)ep_num); deveplen = USB_DIEPxLEN((uint16_t)ep_num); /* clear transfer length to 0 */ deveplen &= ~DEPLEN_TLEN; /* clear transfer packet to 0 */ deveplen &= ~DEPLEN_PCNT; /* zero length packet */ if (0U == ep->xfer_len) { /* set transfer packet count to 1 */ deveplen |= 1U << 19U; } else { if (0U == ep_num) { if (ep->xfer_len > ep->endp_mps) { ep->xfer_len = ep->endp_mps; } deveplen |= 1U << 19U; } else { deveplen |= ((ep->xfer_len - 1U + ep->endp_mps) / ep->endp_mps) << 19U; } /* configure the transfer size and packet count as follows: * xfersize = N * maxpacket + short_packet * pktcnt = N + (short_packet exist ? 1 : 0) */ deveplen |= ep->xfer_len; if (USB_EPTYPE_ISOC == ep->endp_type) { deveplen |= DIEPLEN_MCNT & (1U << 29U); } } USB_DIEPxLEN((uint16_t)ep_num) = deveplen; if (USB_EPTYPE_ISOC == ep->endp_type) { if (0U == (((USB_DSTAT & DSTAT_FNRSOF) >> 8U) & 0x1U)) { devepctl |= DEPCTL_SODDFRM; } else { devepctl |= DEPCTL_SEVNFRM; } } /* enable the endpoint and clear the NAK */ devepctl |= DEPCTL_EPEN | DEPCTL_CNAK; USB_DIEPxCTL((uint16_t)ep_num) = devepctl; if (USB_EPTYPE_ISOC != ep->endp_type) { /* enable the Tx FIFO empty interrupt for this endpoint */ if (ep->xfer_len > 0U) { USB_DIEPFEINTEN |= 1U << ep_num; } } else { usb_fifo_write(ep->xfer_buff, ep_num, (uint16_t)ep->xfer_len); } } /*! \brief transmit data on the control channel \param[in] pudev: pointer to usb device instance \param[in] pbuf: pointer to buffer \param[in] len: buffer length \param[out] none \retval usb device operation status */ usbd_status_enum usbd_ctltx (usb_core_handle_struct *pudev, uint8_t *pbuf, uint16_t len) { usbd_status_enum ret = USBD_OK; pudev->dev.sum_len = len; pudev->dev.remain_len = len; pudev->dev.ctl_status = USB_CTRL_DATA_IN; usbd_ep_tx (pudev, 0U, pbuf, (uint32_t)len); return ret; } /*! \brief receive data on the control channel \param[in] pudev: pointer to usb device instance \param[in] pbuf: pointer to buffer \param[in] len: buffer length \param[out] none \retval usb device operation status */ usbd_status_enum usbd_ctlrx (usb_core_handle_struct *pudev, uint8_t *pbuf, uint16_t len) { pudev->dev.sum_len = len; pudev->dev.remain_len = len; pudev->dev.ctl_status = USB_CTRL_DATA_OUT; usbd_ep_rx (pudev, 0U, pbuf, len); return USBD_OK; } /*! \brief transmit status on the control channel \param[in] pudev: pointer to usb device instance \param[out] none \retval usb device operation status */ usbd_status_enum usbd_ctlstatus_tx (usb_core_handle_struct *pudev) { pudev->dev.ctl_status = USB_CTRL_STATUS_IN; usbd_ep_tx (pudev, 0U, NULL, 0U); usb_ep0_startout(pudev); return USBD_OK; } /*! \brief receive status on the control channel \param[in] pudev: pointer to usb device instance \param[out] none \retval usb device operation status */ usbd_status_enum usbd_ctlstatus_rx (usb_core_handle_struct *pudev) { pudev->dev.ctl_status = USB_CTRL_STATUS_OUT; usbd_ep_rx (pudev, 0U, NULL, 0U); usb_ep0_startout(pudev); return USBD_OK; } /*! \brief set an endpoint to STALL status \param[in] pudev: pointer to usb device instance \param[in] ep_addr: endpoint address \param[out] none \retval none */ void usbd_ep_stall (usb_core_handle_struct *pudev, uint8_t ep_addr) { uint8_t ep_num = ep_addr & 0x7FU; __IO uint32_t devepctl = 0U; if (ep_addr >> 7U) { devepctl = USB_DIEPxCTL((uint16_t)ep_num); /* set the endpoint disable bit */ if (devepctl & DEPCTL_EPEN) { devepctl |= DEPCTL_EPD; } /* set the endpoint stall bit */ devepctl |= DEPCTL_STALL; USB_DIEPxCTL((uint16_t)ep_num) = devepctl; } else { /* set the endpoint stall bit */ USB_DOEPxCTL((uint16_t)ep_num) |= DEPCTL_STALL; } } /*! \brief clear endpoint stalled status \param[in] pudev: pointer to usb device instance \param[in] ep_addr: endpoint address \param[out] none \retval none */ void usbd_ep_clear_stall (usb_core_handle_struct *pudev, uint8_t ep_addr) { usb_ep_struct *ep; uint8_t ep_num = ep_addr & 0x7FU; __IO uint32_t devepctl = 0U; if(ep_addr >> 7U){ ep = &pudev->dev.in_ep[ep_num]; devepctl = USB_DIEPxCTL((uint16_t)ep_num); /* clear the in endpoint stall bits */ devepctl &= ~DEPCTL_STALL; if ((USB_EPTYPE_INTR == ep->endp_type) || (USB_EPTYPE_BULK == ep->endp_type)) { devepctl |= DEPCTL_SEVNFRM; } USB_DIEPxCTL((uint16_t)ep_num) = devepctl; } else { ep = &pudev->dev.out_ep[ep_num]; devepctl = USB_DOEPxCTL((uint16_t)ep_num); /* clear the out endpoint stall bits */ devepctl &= ~DEPCTL_STALL; if ((USB_EPTYPE_INTR == ep->endp_type) || (USB_EPTYPE_BULK == ep->endp_type)) { devepctl |= DEPCTL_SEVNFRM; } USB_DOEPxCTL((uint16_t)ep_num) = devepctl; } } /*! \brief flushes the fifos \param[in] pudev: pointer to usb device instance \param[in] ep_addr: endpoint address \param[out] none \retval none */ void usbd_ep_fifo_flush (usb_core_handle_struct *pudev, uint8_t ep_addr) { if (ep_addr >> 7U) { usb_txfifo_flush(pudev, ep_addr & 0x7FU); } else { usb_rxfifo_flush(pudev); } } /*! \brief get the received data length \param[in] pudev: pointer to usb device instance \param[in] ep_num: endpoint identifier which is in (0..3) \param[out] none \retval received data length */ uint16_t usbd_rxcount_get (usb_core_handle_struct *pudev, uint8_t ep_num) { return (uint16_t)pudev->dev.out_ep[ep_num].xfer_count; }
01615f31cf2e0dd07e8fee6824e7ea35151a32f5
3cd3872acbc8b1a79a70b89b2fd58a171e7adc82
/vp8/encoder/ratectrl.h
844c72cb8614bfec5349e1f7cfba2250c6b868cc
[]
permissive
webmproject/libvpx
58ab97861063cb521ec0d00ef9cb222ca97873b1
6fd360c684736e351160b131827dfbb207841164
refs/heads/main
2023-04-09T15:32:34.688724
2023-04-07T22:19:18
2023-04-07T22:19:18
22,927,608
889
376
BSD-3-Clause
2023-03-24T13:37:34
2014-08-13T19:03:21
C
UTF-8
C
false
false
1,342
h
ratectrl.h
/* * Copyright (c) 2010 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef VPX_VP8_ENCODER_RATECTRL_H_ #define VPX_VP8_ENCODER_RATECTRL_H_ #include "onyx_int.h" #ifdef __cplusplus extern "C" { #endif extern void vp8_save_coding_context(VP8_COMP *cpi); extern void vp8_restore_coding_context(VP8_COMP *cpi); extern void vp8_setup_key_frame(VP8_COMP *cpi); extern void vp8_update_rate_correction_factors(VP8_COMP *cpi, int damp_var); extern int vp8_regulate_q(VP8_COMP *cpi, int target_bits_per_frame); extern void vp8_adjust_key_frame_context(VP8_COMP *cpi); extern void vp8_compute_frame_size_bounds(VP8_COMP *cpi, int *frame_under_shoot_limit, int *frame_over_shoot_limit); /* return of 0 means drop frame */ extern int vp8_pick_frame_size(VP8_COMP *cpi); extern int vp8_drop_encodedframe_overshoot(VP8_COMP *cpi, int Q); #ifdef __cplusplus } // extern "C" #endif #endif // VPX_VP8_ENCODER_RATECTRL_H_
69f9fee3b3948bdd6a5860e74e27ae35ad3027e5
ecce427678ecff2a93a47f3b1b664202c7d27617
/actors/chair/anims/table.inc.c
1fb28dca8f23ecea4d437600f7aac59e7444815a
[]
no_license
sm64pc/sm64ex
ecf37f31b3f7426c4874254660d856030d789714
54cd27ccee45a2403b45f07a00d6043c51149969
refs/heads/nightly
2023-08-11T12:14:34.424168
2023-07-01T11:45:50
2023-07-01T11:45:50
262,091,731
795
238
null
2023-07-01T11:45:51
2020-05-07T15:43:27
C
UTF-8
C
false
false
110
c
table.inc.c
// 0x05005784 const struct Animation *const chair_seg5_anims_05005784[] = { &chair_seg5_anim_0500576C, };
ef6bc3c13935b7d7fbd98cfb1ca13c8fa6a50d1c
bed3ac926beac0f4e0293303d7b2a6031ee476c9
/Modules/ThirdParty/NrrdIO/src/NrrdIO/endianAir.c
000b834e2def9cfd88e4790a4f4f365bcf75b282
[ "Zlib", "LicenseRef-scancode-unknown-license-reference", "IJG", "LicenseRef-scancode-proprietary-license", "SMLNJ", "BSD-3-Clause", "BSD-4.3TAHOE", "LicenseRef-scancode-free-unknown", "Spencer-86", "LicenseRef-scancode-llnl", "FSFUL", "Libpng", "libtiff", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-other-permissive", "LicenseRef-scancode-hdf5", "MIT", "NTP", "LicenseRef-scancode-mit-old-style", "GPL-1.0-or-later", "MPL-2.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
InsightSoftwareConsortium/ITK
ed9dbbc5b8b3f7511f007c0fc0eebb3ad37b88eb
3eb8fd7cdfbc5ac2d0c2e5e776848a4cbab3d7e1
refs/heads/master
2023-08-31T17:21:47.754304
2023-08-31T00:58:51
2023-08-31T14:12:21
800,928
1,229
656
Apache-2.0
2023-09-14T17:54:00
2010-07-27T15:48:04
C++
UTF-8
C
false
false
2,343
c
endianAir.c
/* NrrdIO: stand-alone code for basic nrrd functionality Copyright (C) 2013, 2012, 2011, 2010, 2009 University of Chicago Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #include "NrrdIO.h" /* ******** airMyEndian() ** ** determine at run-time if we are little (1234) or big (4321) endian */ int airMyEndian(void) { int tmpI, ret; char leastbyte; /* set int to 1: least signficant byte will be 1, most signficant byte will be 0 */ tmpI = 1; /* cast address of (4-byte) int to char*, and dereference, which retrieves the byte at the low-address-end of int (the "first" byte in memory ordering). On big endian, we're getting the most significant byte (0); on little endian, we're getting least significant byte (1) */ leastbyte = *(AIR_CAST(char*, &tmpI)); if (leastbyte) { ret = airEndianLittle; } else { ret = airEndianBig; } return ret; } static const char * _airEndianStr[] = { "(unknown endian)", "little", "big" }; static const char * _airEndianDesc[] = { "unknown endianness", "Intel and compatible", "Everyone besides Intel and compatible" }; static const int _airEndianVal[] = { airEndianUnknown, airEndianLittle, airEndianBig, }; static const airEnum _airEndian = { "endian", 2, _airEndianStr, _airEndianVal, _airEndianDesc, NULL, NULL, AIR_FALSE }; const airEnum *const airEndian = &_airEndian;
e2f0e43890fa24e1e3e9c6d4400a50a05e1b3395
c8abb7c0a610348eb0b8474ce66463584ec5bc98
/Public/Src/Sandbox/Windows/DetoursServices/targetver.h
2780471137c9fae410016c37258a05fc38068111
[ "MIT" ]
permissive
microsoft/BuildXL
d31b74ba23057dd251bcd9040390a7e751f04fae
f884dd1e34ed50f76d27d3fb1b8679235995653d
refs/heads/main
2023-08-31T21:19:44.385093
2023-08-30T23:36:57
2023-08-30T23:36:57
152,813,045
436
114
MIT
2023-09-13T09:49:08
2018-10-12T22:16:45
C#
UTF-8
C
false
false
380
h
targetver.h
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once #if !defined(MAC_OS_SANDBOX) && !defined(MAC_OS_LIBRARY) // BuildXL should run on Win7+. #include <WinSDKVer.h> #define _WIN32_WINNT _WIN32_WINNT_WIN7 #include <SDKDDKVer.h> #endif // !defined(MAC_OS)
6aed4161695108093b26ba247ee2f92a4a597916
e0951f0c08fb24ce57d5b6fb3f364e314e94ac67
/demo/2017.06.29-webassembly/running-js-in-c/simple1.c
5fe9922ab7733e9806eddd6815155d88455b2486
[]
no_license
chyingp/blog
1a69ddcd8acbcf20c80995d274e81450c278f32f
4fcfd719ed01f446d8f1eea721551e71db4909cf
refs/heads/master
2023-08-27T00:23:18.260234
2023-07-27T15:50:03
2023-07-27T15:50:03
9,654,619
491
279
null
2023-01-12T23:53:47
2013-04-24T18:17:08
null
UTF-8
C
false
false
97
c
simple1.c
#include <emscripten.h> int main() { EM_ASM({ Module.print('hello world'); }); return 0; }
d7795a06a7655e3b82db8d44a8de8cd1a3f0687e
9de0cec678bc4a3bec2b4adabef9f39ff5b4afac
/PWGLF/FORWARD/analysis2/dndeta/ScaleBypp.C
4eebbe981893db4601bb2530c652bd7d7fb56366
[]
permissive
alisw/AliPhysics
91bf1bd01ab2af656a25ff10b25e618a63667d3e
5df28b2b415e78e81273b0d9bf5c1b99feda3348
refs/heads/master
2023-08-31T20:41:44.927176
2023-08-31T14:51:12
2023-08-31T14:51:12
61,661,378
129
1,150
BSD-3-Clause
2023-09-14T18:48:45
2016-06-21T19:31:29
C++
UTF-8
C
false
false
1,273
c
ScaleBypp.C
// Draw scaled result void ScaleBypp(const TString& system, UShort_t sNN, UShort_t ppsNN, const TString& trigger, const TString& ppTrigger, Double_t etaShift=0, Bool_t rebinned=true, Bool_t empirical=true, Bool_t symmetrice=false, Bool_t write=false) { if (gSystem->Getenv("FWD")) fwd = gSystem->Getenv("FWD"); else fwd = gSystem->ExpandPathName("$ALICE_PHYSICS/PWGLF/FORWARD/analysis2"); gROOT->SetMacroPath(Form("%s/dndeta:%s", gROOT->GetMacroPath(),fwd)); if (!gROOT->GetClass("Drawer")) gROOT->LoadMacro("Drawer.C+"); if (symmetrice && system.EqualTo("pPb")) Drawer::SymScaleBypp(ppsNN, trigger, ppTrigger, "", rebinned, empirical, write); else Drawer::ScaleBypp(system, sNN, ppsNN, trigger, ppTrigger, etaShift, rebinned, empirical, write); } void ScaleBypp() { ScaleBypp("pPb", 5023, 7000, "CENTZNX", "NSD", 0, true, true, true, true); ScaleBypp("pPb", 5023, 7000, "CENTV0X", "NSD", 0, true, true, true, true); ScaleBypp("pPb", 5023, 7000, "CENTZNX", "INEL", 0, true, true, true, true); ScaleBypp("pPb", 5023, 7000, "CENTV0X", "INEL", 0, true, true, true, true); } // EOF
5bb44692a79210b25d4153b9f931b4b01c6e3559
9ceacf33fd96913cac7ef15492c126d96cae6911
/regress/lib/libpthread/semaphore/sem_destroy/sem_destroy.c
b38965260f346110cf909fc22bb5274061e19d04
[]
no_license
openbsd/src
ab97ef834fd2d5a7f6729814665e9782b586c130
9e79f3a0ebd11a25b4bff61e900cb6de9e7795e9
refs/heads/master
2023-09-02T18:54:56.624627
2023-09-02T15:16:12
2023-09-02T15:16:12
66,966,208
3,394
1,235
null
2023-08-08T02:42:25
2016-08-30T18:18:25
C
UTF-8
C
false
false
1,208
c
sem_destroy.c
/* $OpenBSD: sem_destroy.c,v 1.1.1.1 2012/01/04 17:36:40 mpi Exp $ */ /* * Martin Pieuchot <mpi@openbsd.org>, 2011. Public Domain. */ #include <errno.h> #include <unistd.h> #include <pthread.h> #include <semaphore.h> #include "test.h" int val; sem_t cons_sem; sem_t prod_sem; void *producer(void *arg); void *consumer(void *arg); int main(int argc, char **argv) { pthread_t prod_th, cons_th; long counter = 4; CHECKn(sem_destroy(&cons_sem)); ASSERT(errno == EINVAL); val = 0; CHECKr(sem_init(&cons_sem, 0, 0)); CHECKr(sem_init(&prod_sem, 0, 1)); CHECKr(pthread_create(&prod_th, NULL, producer, &counter)); CHECKr(pthread_create(&cons_th, NULL, consumer, &counter)); CHECKr(pthread_join(prod_th, NULL)); CHECKr(pthread_join(cons_th, NULL)); pthread_exit(NULL); CHECKr(sem_destroy(&prod_sem)); CHECKr(sem_destroy(&cons_sem)); SUCCEED; } void * producer(void *arg) { long *counter = arg; int i; for (i = 0; i < *counter; i++) { sem_wait(&prod_sem); val++; sem_post(&cons_sem); } return (NULL); } void * consumer(void *arg) { long *counter = arg; int i; for (i = 0; i < *counter; i++) { sem_wait(&cons_sem); val--; sem_post(&prod_sem); } return (NULL); }
06974ddbff4a5e1dbdf62d93c5d9c0a4ede0342e
72f6d3ad72b2a4a9b6c5f93c5d1b744e2940b884
/deps/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c
fe8cf0aa7fbd787cd879cb5ef37e495f868c0983
[ "MIT" ]
permissive
h2o/h2o
70012b6527ceb54e9e2819c9c75242b18e381485
b165770ce704c782ddee7428ea4a0b23c8bb7894
refs/heads/master
2023-08-16T13:16:35.018003
2023-08-16T03:56:28
2023-08-16T03:56:28
23,029,617
9,377
983
MIT
2023-09-12T04:49:14
2014-08-16T23:59:03
C
UTF-8
C
false
false
1,266
c
cmdrun.c
/* ** cmdrun.c - mruby debugger run command functions ** */ #include <mruby/opcode.h> #include "mrdb.h" dbgcmd_state dbgcmd_run(mrb_state *mrb, mrdb_state *mrdb) { mrb_debug_context *dbg = mrdb->dbg; if (dbg->xm == DBG_INIT){ dbg->xm = DBG_RUN; } else { dbg->xm = DBG_QUIT; if (dbg->xphase == DBG_PHASE_RUNNING){ struct RClass *exc; puts("Start it from the beginning"); exc = mrb_define_class(mrb, "DebuggerRestart", mrb->eException_class); mrb_raise(mrb, exc, "Restart mrdb"); } } return DBGST_RESTART; } dbgcmd_state dbgcmd_continue(mrb_state *mrb, mrdb_state *mrdb) { mrb_debug_context *dbg = mrdb->dbg; int ccnt = 1; if (mrdb->wcnt > 1){ sscanf(mrdb->words[1], "%d", &ccnt); } dbg->ccnt = (uint16_t)(ccnt > 0 ? ccnt : 1); /* count of continue */ if (dbg->xphase == DBG_PHASE_AFTER_RUN){ puts("The program is not running."); dbg->xm = DBG_QUIT; } else { dbg->xm = DBG_RUN; } return DBGST_CONTINUE; } dbgcmd_state dbgcmd_step(mrb_state *mrb, mrdb_state *mrdb) { mrdb->dbg->xm = DBG_STEP; return DBGST_CONTINUE; } dbgcmd_state dbgcmd_next(mrb_state *mrb, mrdb_state *mrdb) { mrdb->dbg->xm = DBG_NEXT; mrdb->dbg->prvci = mrb->c->ci; return DBGST_CONTINUE; }
14f83968f083a488b94bfd7c1f6fbcaedacc61ca
33392bbfbc4abd42b0c67843c7c6ba9e0692f845
/dsp/L1/tests/aie/inc/twiddle.c
32d80d28fe1c39a27ffc0221e88cf2251c7b573b
[ "Apache-2.0", "OFL-1.1", "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "BSD-2-Clause", "MIT" ]
permissive
Xilinx/Vitis_Libraries
bad9474bf099ed288418430f695572418c87bc29
2e6c66f83ee6ad21a7c4f20d6456754c8e522995
refs/heads/main
2023-07-20T09:01:16.129113
2023-06-08T08:18:19
2023-06-08T08:18:19
210,433,135
785
371
Apache-2.0
2023-07-06T21:35:46
2019-09-23T19:13:46
C++
UTF-8
C
false
false
4,915
c
twiddle.c
/* * Copyright (C) 2019-2022, Xilinx, Inc. * Copyright (C) 2022-2023, Advanced Micro Devices, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /*----------------------------- * program to calculate a lookup table of twiddle values * * To compile this program run * gcc -lm -o twiddle.o twiddle.c * the -lm is necessary to include the math library */ #include <math.h> #include <stdio.h> #include <inttypes.h> #define PI 3.14159265358979323846e0 #define PT_SIZE 4096 #define DIR -1 int main() { int i, k; int tableSizePower; int modulus; double theta, temp; FILE* fp; FILE* fp_uut; short realshort, imagshort; int realint, imagint; float realfloat[PT_SIZE / 2], imagfloat[PT_SIZE / 2]; fp_uut = fopen("../../include/hw/fft_twiddle_lut_dit_cfloat.h", "w"); fp = fopen("twiddle_master.h", "w"); double reals[PT_SIZE / 2], imags[PT_SIZE / 2]; for (i = 0; i < PT_SIZE / 2; i++) { // one octant, then extrapolate from there. theta = (double)i * 2.0 * PI / (double)PT_SIZE; reals[i] = cos(theta); imags[i] = sin(theta) * DIR; /* //use octant symmetry to get second octant reals[PT_SIZE/4-i] = imags[i]*DIR; imags[PT_SIZE/4-i] = reals[i]*DIR; //use octant symmetry to get third octant reals[PT_SIZE/4+i] = -reals[PT_SIZE/4-i]; imags[PT_SIZE/4+i] = imags[PT_SIZE/4-i]; //use octant symmetry to get fourth octant reals[PT_SIZE/2-i] = -reals[i]; imags[PT_SIZE/2-i] = imags[i]; */ } // cshort table fprintf(fp, "const cint16 twiddle_master[%d] = {\n", PT_SIZE / 2); for (i = 0; i < PT_SIZE / 2; i++) { temp = round(reals[i] * 32768.0); realshort = (short)temp; if (temp >= 32767.0) { realshort = 32767; } temp = round(imags[i] * 32768.0); imagshort = (short)temp; if (temp >= 32768.0) { imagshort = 32767; } fprintf(fp, "{%d, %d}", realshort, imagshort); if (i < PT_SIZE / 2 - 1) { fprintf(fp, ", "); } if (i % 8 == 7) { fprintf(fp, "\n"); } } fprintf(fp, "};\n"); // cint table fprintf(fp, "const cint32 twiddle_master[%d] = {\n", PT_SIZE / 2); for (i = 0; i < PT_SIZE / 2; i++) { temp = round(reals[i] * 2147483648.0); realint = (int)temp; if (temp >= 2147483647.0) { realint = 2147483647; } temp = round(imags[i] * 2147483648.0); imagint = (int)temp; if (temp >= 2147483648.0) { imagint = 2147483647; } fprintf(fp, "{%d, %d}", realint, imagint); if (i < PT_SIZE / 2 - 1) { fprintf(fp, ", "); } if (i % 8 == 7) { fprintf(fp, "\n"); } } fprintf(fp, "};\n"); // cfloat table fprintf(fp, "const cfloat twiddle_master[%d] = {\n", PT_SIZE / 2); for (i = 0; i < PT_SIZE / 2; i++) { realfloat[i] = (float)reals[i]; imagfloat[i] = (float)imags[i]; fprintf(fp, "{%.9f, %.9f}", realfloat[i], imagfloat[i]); if (i < PT_SIZE / 2 - 1) { fprintf(fp, ", "); } if (i % 8 == 7) { fprintf(fp, "\n"); } } fprintf(fp, "};\n"); fclose(fp); fprintf(fp_uut, "#ifndef __FFT_TWIDDLE_LUT_DIT_CFLOAT_H__\n#define __FFT_TWIDDLE_LUT_DIT_CFLOAT_H__\n\n#include " "\"fft_com_inc.h\"\n"); fprintf(fp_uut, "// DO NOT HAND EDIT THIS FILE. IT WAS CREATED using ../tests/inc/twiddle.c\n\n"); for (tableSizePower = 11; tableSizePower >= 0; tableSizePower--) { k = 0; fprintf(fp_uut, "const cfloat chess_storage(%%chess_alignof(v4cint16)) fft_lut_tw%d_cfloat[%d] = {\n", (1 << tableSizePower), (1 << tableSizePower)); for (i = 0; i < PT_SIZE / 2; i += (1 << (11 - tableSizePower))) { fprintf(fp_uut, "{%.9f, %.9f}", realfloat[i], imagfloat[i]); if (i < PT_SIZE / 2 - (1 << (11 - tableSizePower))) { fprintf(fp_uut, ", "); } if ((++k) == 8) { fprintf(fp_uut, "\n"); k = 0; } } fprintf(fp_uut, "};\n"); } // for tableSizePower fprintf(fp_uut, "#endif //__FFT_TWIDDLE_LUT_DIT_CFLOAT_H__\n"); fclose(fp_uut); }
5ea481d63f3f48bb23f334c80cef5c88941d7742
03666e5f961946fc1a0ac67781ac1425562ef0d7
/src/tools/third_party/qtssh/proxy/local.c
3b2d130c56b48dfb503645a3bc45e776c993f4ca
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
visit-dav/visit
e9f81b4d4b9b9930a0db9d5282cd1bcabf465e2e
601ae46e0bef2e18425b482a755d03490ade0493
refs/heads/develop
2023-09-06T08:19:38.397058
2023-09-05T21:29:32
2023-09-05T21:29:32
165,565,988
335
120
BSD-3-Clause
2023-09-14T00:53:37
2019-01-13T23:27:26
C
UTF-8
C
false
false
9,127
c
local.c
/* * Implement LocalProxyOpener, a centralised system for setting up the * command string to be run by platform-specific local-subprocess * proxy types. * * The platform-specific local proxy code is expected to use this * system by calling local_proxy_opener() from * platform_new_connection(); then using the resulting * DeferredSocketOpener to make a deferred version of whatever local * socket type is used for talking to subcommands (Unix FdSocket, * Windows HandleSocket); then passing the 'Socket *' back to us via * local_proxy_opener_set_socket(). * * The LocalProxyOpener object implemented by this code will set * itself up as an Interactor if possible, so that it can prompt for * the proxy username and/or password if they're referred to in the * command string but not given in the config (exactly as the Telnet * proxy does). Once it knows the exact command it wants to run - * whether that was done immediately or after user interaction - it * calls back to platform_setup_local_proxy() with the full command, * which is expected to actually start the subprocess and fill in the * missing details in the deferred socket, freeing the * LocalProxyOpener as a side effect. */ #include "tree234.h" #include "putty.h" #include "network.h" #include "sshcr.h" #include "proxy/proxy.h" typedef struct LocalProxyOpener { int crLine; Socket *socket; char *formatted_cmd; Plug *plug; SockAddr *addr; int port; Conf *conf; Interactor *clientitr; LogPolicy *clientlp; Seat *clientseat; prompts_t *prompts; int username_prompt_index, password_prompt_index; Interactor interactor; DeferredSocketOpener opener; } LocalProxyOpener; static void local_proxy_opener_free(DeferredSocketOpener *opener) { LocalProxyOpener *lp = container_of(opener, LocalProxyOpener, opener); burnstr(lp->formatted_cmd); if (lp->prompts) free_prompts(lp->prompts); sk_addr_free(lp->addr); conf_free(lp->conf); sfree(lp); } static const DeferredSocketOpenerVtable LocalProxyOpener_openervt = { .free = local_proxy_opener_free, }; static char *local_proxy_opener_description(Interactor *itr) { return dupstr("connection via local command"); } static LogPolicy *local_proxy_opener_logpolicy(Interactor *itr) { LocalProxyOpener *lp = container_of(itr, LocalProxyOpener, interactor); return lp->clientlp; } static Seat *local_proxy_opener_get_seat(Interactor *itr) { LocalProxyOpener *lp = container_of(itr, LocalProxyOpener, interactor); return lp->clientseat; } static void local_proxy_opener_set_seat(Interactor *itr, Seat *seat) { LocalProxyOpener *lp = container_of(itr, LocalProxyOpener, interactor); lp->clientseat = seat; } static const InteractorVtable LocalProxyOpener_interactorvt = { .description = local_proxy_opener_description, .logpolicy = local_proxy_opener_logpolicy, .get_seat = local_proxy_opener_get_seat, .set_seat = local_proxy_opener_set_seat, }; static void local_proxy_opener_cleanup_interactor(LocalProxyOpener *lp) { if (lp->clientseat) { interactor_return_seat(lp->clientitr); lp->clientitr = NULL; lp->clientseat = NULL; } } static void local_proxy_opener_coroutine(void *vctx) { LocalProxyOpener *lp = (LocalProxyOpener *)vctx; crBegin(lp->crLine); /* * Make an initial attempt to figure out the command we want, and * see if it tried to include a username or password that we don't * have. */ { unsigned flags; lp->formatted_cmd = format_telnet_command( lp->addr, lp->port, lp->conf, &flags); if (lp->clientseat && (flags & (TELNET_CMD_MISSING_USERNAME | TELNET_CMD_MISSING_PASSWORD))) { burnstr(lp->formatted_cmd); lp->formatted_cmd = NULL; /* * We're missing at least one of the two parts, and we * have an Interactor we can use to prompt for them, so * try it. */ lp->prompts = new_prompts(); lp->prompts->callback = local_proxy_opener_coroutine; lp->prompts->callback_ctx = lp; lp->prompts->to_server = true; lp->prompts->from_server = false; lp->prompts->name = dupstr("Local proxy authentication"); if (flags & TELNET_CMD_MISSING_USERNAME) { lp->username_prompt_index = lp->prompts->n_prompts; add_prompt(lp->prompts, dupstr("Proxy username: "), true); } else { lp->username_prompt_index = -1; } if (flags & TELNET_CMD_MISSING_PASSWORD) { lp->password_prompt_index = lp->prompts->n_prompts; add_prompt(lp->prompts, dupstr("Proxy password: "), false); } else { lp->password_prompt_index = -1; } while (true) { SeatPromptResult spr = seat_get_userpass_input( interactor_announce(&lp->interactor), lp->prompts); if (spr.kind == SPRK_OK) { break; } else if (spr.kind == SPRK_USER_ABORT) { local_proxy_opener_cleanup_interactor(lp); plug_closing_user_abort(lp->plug); /* That will have freed us, so we must just return * without calling any crStop */ return; } else if (spr.kind == SPRK_SW_ABORT) { local_proxy_opener_cleanup_interactor(lp); char *err = spr_get_error_message(spr); plug_closing_error(lp->plug, err); sfree(err); return; /* without crStop, as above */ } crReturnV; } if (lp->username_prompt_index != -1) { conf_set_str( lp->conf, CONF_proxy_username, prompt_get_result_ref( lp->prompts->prompts[lp->username_prompt_index])); } if (lp->password_prompt_index != -1) { conf_set_str( lp->conf, CONF_proxy_password, prompt_get_result_ref( lp->prompts->prompts[lp->password_prompt_index])); } free_prompts(lp->prompts); lp->prompts = NULL; } /* * Now format the command a second time, with the results of * those prompts written into lp->conf. */ lp->formatted_cmd = format_telnet_command( lp->addr, lp->port, lp->conf, NULL); } /* * Log the command, with some changes. Firstly, we regenerate it * with the password masked; secondly, we escape control * characters so that the log message is printable. */ conf_set_str(lp->conf, CONF_proxy_password, "*password*"); { char *censored_cmd = format_telnet_command( lp->addr, lp->port, lp->conf, NULL); strbuf *logmsg = strbuf_new(); put_datapl(logmsg, PTRLEN_LITERAL("Starting local proxy command: ")); put_c_string_literal(logmsg, ptrlen_from_asciz(censored_cmd)); plug_log(lp->plug, PLUGLOG_PROXY_MSG, NULL, 0, logmsg->s, 0); strbuf_free(logmsg); sfree(censored_cmd); } /* * Now we're ready to actually do the platform-specific socket * setup. */ char *cmd = lp->formatted_cmd; lp->formatted_cmd = NULL; local_proxy_opener_cleanup_interactor(lp); char *error_msg = platform_setup_local_proxy(lp->socket, cmd); burnstr(cmd); if (error_msg) { plug_closing_error(lp->plug, error_msg); sfree(error_msg); } else { /* If error_msg was NULL, there was no error in setup, * which means that platform_setup_local_proxy will have * called back to free us. So return without calling any * crStop. */ return; } crFinishV; } DeferredSocketOpener *local_proxy_opener( SockAddr *addr, int port, Plug *plug, Conf *conf, Interactor *itr) { LocalProxyOpener *lp = snew(LocalProxyOpener); memset(lp, 0, sizeof(*lp)); lp->plug = plug; lp->opener.vt = &LocalProxyOpener_openervt; lp->interactor.vt = &LocalProxyOpener_interactorvt; lp->addr = sk_addr_dup(addr); lp->port = port; lp->conf = conf_copy(conf); if (itr) { lp->clientitr = itr; interactor_set_child(lp->clientitr, &lp->interactor); lp->clientlp = interactor_logpolicy(lp->clientitr); lp->clientseat = interactor_borrow_seat(lp->clientitr); } return &lp->opener; } void local_proxy_opener_set_socket(DeferredSocketOpener *opener, Socket *socket) { assert(opener->vt == &LocalProxyOpener_openervt); LocalProxyOpener *lp = container_of(opener, LocalProxyOpener, opener); lp->socket = socket; queue_toplevel_callback(local_proxy_opener_coroutine, lp); }
640257503b78893d7b55ab8f6cad9e1a5e9cc061
d10f01fdebccc1e217889ea39c381fc704155534
/libpstack/dwarf/ehpe.h
d5b7e960b9495e65fb0f96b601b65d28703d2668
[ "BSD-2-Clause" ]
permissive
peadar/pstack
37db4da2654d42d5e5dfd0335ec19d22e76c7a87
2d286b31193e527e3d7fd316181827b66597be01
refs/heads/master
2023-08-30T19:00:41.969469
2023-08-26T17:49:13
2023-08-26T17:49:13
5,349,428
131
21
BSD-2-Clause
2023-08-27T11:53:34
2012-08-09T00:44:58
C++
UTF-8
C
false
false
495
h
ehpe.h
DWARF_EH_PE(DW_EH_PE_absptr, 0x00) DWARF_EH_PE(DW_EH_PE_uleb128, 0x01) DWARF_EH_PE(DW_EH_PE_udata2, 0x02) DWARF_EH_PE(DW_EH_PE_udata4, 0x03) DWARF_EH_PE(DW_EH_PE_udata8, 0x04) DWARF_EH_PE(DW_EH_PE_sleb128, 0x09) DWARF_EH_PE(DW_EH_PE_sdata2, 0x0A) DWARF_EH_PE(DW_EH_PE_sdata4, 0x0B) DWARF_EH_PE(DW_EH_PE_sdata8, 0x0C) DWARF_EH_PE(DW_EH_PE_pcrel, 0x10) DWARF_EH_PE(DW_EH_PE_textrel, 0x20) DWARF_EH_PE(DW_EH_PE_datarel, 0x30) DWARF_EH_PE(DW_EH_PE_funcrel, 0x40) DWARF_EH_PE(DW_EH_PE_aligned, 0x50)
485b74fae2a06145321ba37a27bdb7b705b653ab
a3d6556180e74af7b555f8d47d3fea55b94bcbda
/third_party/fontconfig/include/fc-case/fccase.h
7c844f38795bf4d7902a9e2c2f2f3de20ff69b13
[ "GPL-1.0-or-later", "MIT", "LGPL-2.0-or-later", "Apache-2.0", "BSD-3-Clause", "HPND-sell-variant" ]
permissive
chromium/chromium
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
refs/heads/main
2023-08-24T00:35:12.585945
2023-08-23T22:01:11
2023-08-23T22:01:11
120,360,765
17,408
7,102
BSD-3-Clause
2023-09-10T23:44:27
2018-02-05T20:55:32
null
UTF-8
C
false
false
21,735
h
fccase.h
/* * fontconfig/fc-case/fccase.tmpl.h * * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of the author(s) not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. The authors make no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #define FC_NUM_CASE_FOLD 302 #define FC_NUM_CASE_FOLD_CHARS 471 #define FC_MAX_CASE_FOLD_CHARS 6 #define FC_MAX_CASE_FOLD_EXPAND 4 #define FC_MIN_FOLD_CHAR 0x00000041 #define FC_MAX_FOLD_CHAR 0x0001e921 static const FcCaseFold fcCaseFold[FC_NUM_CASE_FOLD] = { { 0x00000041, FC_CASE_FOLD_RANGE, 0x001a, 32 }, { 0x000000b5, FC_CASE_FOLD_RANGE, 0x0001, 775 }, { 0x000000c0, FC_CASE_FOLD_RANGE, 0x0017, 32 }, { 0x000000d8, FC_CASE_FOLD_RANGE, 0x0007, 32 }, { 0x000000df, FC_CASE_FOLD_FULL, 0x0002, 0 }, { 0x00000100, FC_CASE_FOLD_EVEN_ODD, 0x002f, 1 }, { 0x00000130, FC_CASE_FOLD_FULL, 0x0003, 2 }, { 0x00000132, FC_CASE_FOLD_EVEN_ODD, 0x0005, 1 }, { 0x00000139, FC_CASE_FOLD_EVEN_ODD, 0x000f, 1 }, { 0x00000149, FC_CASE_FOLD_FULL, 0x0003, 5 }, { 0x0000014a, FC_CASE_FOLD_EVEN_ODD, 0x002d, 1 }, { 0x00000178, FC_CASE_FOLD_RANGE, 0x0001, -121 }, { 0x00000179, FC_CASE_FOLD_EVEN_ODD, 0x0005, 1 }, { 0x0000017f, FC_CASE_FOLD_RANGE, 0x0001, -268 }, { 0x00000181, FC_CASE_FOLD_RANGE, 0x0001, 210 }, { 0x00000182, FC_CASE_FOLD_EVEN_ODD, 0x0003, 1 }, { 0x00000186, FC_CASE_FOLD_RANGE, 0x0001, 206 }, { 0x00000187, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x00000189, FC_CASE_FOLD_RANGE, 0x0002, 205 }, { 0x0000018b, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x0000018e, FC_CASE_FOLD_RANGE, 0x0001, 79 }, { 0x0000018f, FC_CASE_FOLD_RANGE, 0x0001, 202 }, { 0x00000190, FC_CASE_FOLD_RANGE, 0x0001, 203 }, { 0x00000191, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x00000193, FC_CASE_FOLD_RANGE, 0x0001, 205 }, { 0x00000194, FC_CASE_FOLD_RANGE, 0x0001, 207 }, { 0x00000196, FC_CASE_FOLD_RANGE, 0x0001, 211 }, { 0x00000197, FC_CASE_FOLD_RANGE, 0x0001, 209 }, { 0x00000198, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x0000019c, FC_CASE_FOLD_RANGE, 0x0001, 211 }, { 0x0000019d, FC_CASE_FOLD_RANGE, 0x0001, 213 }, { 0x0000019f, FC_CASE_FOLD_RANGE, 0x0001, 214 }, { 0x000001a0, FC_CASE_FOLD_EVEN_ODD, 0x0005, 1 }, { 0x000001a6, FC_CASE_FOLD_RANGE, 0x0001, 218 }, { 0x000001a7, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000001a9, FC_CASE_FOLD_RANGE, 0x0001, 218 }, { 0x000001ac, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000001ae, FC_CASE_FOLD_RANGE, 0x0001, 218 }, { 0x000001af, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000001b1, FC_CASE_FOLD_RANGE, 0x0002, 217 }, { 0x000001b3, FC_CASE_FOLD_EVEN_ODD, 0x0003, 1 }, { 0x000001b7, FC_CASE_FOLD_RANGE, 0x0001, 219 }, { 0x000001b8, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000001bc, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000001c4, FC_CASE_FOLD_RANGE, 0x0001, 2 }, { 0x000001c5, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000001c7, FC_CASE_FOLD_RANGE, 0x0001, 2 }, { 0x000001c8, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000001ca, FC_CASE_FOLD_RANGE, 0x0001, 2 }, { 0x000001cb, FC_CASE_FOLD_EVEN_ODD, 0x0011, 1 }, { 0x000001de, FC_CASE_FOLD_EVEN_ODD, 0x0011, 1 }, { 0x000001f0, FC_CASE_FOLD_FULL, 0x0003, 8 }, { 0x000001f1, FC_CASE_FOLD_RANGE, 0x0001, 2 }, { 0x000001f2, FC_CASE_FOLD_EVEN_ODD, 0x0003, 1 }, { 0x000001f6, FC_CASE_FOLD_RANGE, 0x0001, -97 }, { 0x000001f7, FC_CASE_FOLD_RANGE, 0x0001, -56 }, { 0x000001f8, FC_CASE_FOLD_EVEN_ODD, 0x0027, 1 }, { 0x00000220, FC_CASE_FOLD_RANGE, 0x0001, -130 }, { 0x00000222, FC_CASE_FOLD_EVEN_ODD, 0x0011, 1 }, { 0x0000023a, FC_CASE_FOLD_RANGE, 0x0001, 10795 }, { 0x0000023b, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x0000023d, FC_CASE_FOLD_RANGE, 0x0001, -163 }, { 0x0000023e, FC_CASE_FOLD_RANGE, 0x0001, 10792 }, { 0x00000241, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x00000243, FC_CASE_FOLD_RANGE, 0x0001, -195 }, { 0x00000244, FC_CASE_FOLD_RANGE, 0x0001, 69 }, { 0x00000245, FC_CASE_FOLD_RANGE, 0x0001, 71 }, { 0x00000246, FC_CASE_FOLD_EVEN_ODD, 0x0009, 1 }, { 0x00000345, FC_CASE_FOLD_RANGE, 0x0001, 116 }, { 0x00000370, FC_CASE_FOLD_EVEN_ODD, 0x0003, 1 }, { 0x00000376, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x0000037f, FC_CASE_FOLD_RANGE, 0x0001, 116 }, { 0x00000386, FC_CASE_FOLD_RANGE, 0x0001, 38 }, { 0x00000388, FC_CASE_FOLD_RANGE, 0x0003, 37 }, { 0x0000038c, FC_CASE_FOLD_RANGE, 0x0001, 64 }, { 0x0000038e, FC_CASE_FOLD_RANGE, 0x0002, 63 }, { 0x00000390, FC_CASE_FOLD_FULL, 0x0006, 11 }, { 0x00000391, FC_CASE_FOLD_RANGE, 0x0011, 32 }, { 0x000003a3, FC_CASE_FOLD_RANGE, 0x0009, 32 }, { 0x000003b0, FC_CASE_FOLD_FULL, 0x0006, 17 }, { 0x000003c2, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000003cf, FC_CASE_FOLD_RANGE, 0x0001, 8 }, { 0x000003d0, FC_CASE_FOLD_RANGE, 0x0001, -30 }, { 0x000003d1, FC_CASE_FOLD_RANGE, 0x0001, -25 }, { 0x000003d5, FC_CASE_FOLD_RANGE, 0x0001, -15 }, { 0x000003d6, FC_CASE_FOLD_RANGE, 0x0001, -22 }, { 0x000003d8, FC_CASE_FOLD_EVEN_ODD, 0x0017, 1 }, { 0x000003f0, FC_CASE_FOLD_RANGE, 0x0001, -54 }, { 0x000003f1, FC_CASE_FOLD_RANGE, 0x0001, -48 }, { 0x000003f4, FC_CASE_FOLD_RANGE, 0x0001, -60 }, { 0x000003f5, FC_CASE_FOLD_RANGE, 0x0001, -64 }, { 0x000003f7, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000003f9, FC_CASE_FOLD_RANGE, 0x0001, -7 }, { 0x000003fa, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000003fd, FC_CASE_FOLD_RANGE, 0x0003, -130 }, { 0x00000400, FC_CASE_FOLD_RANGE, 0x0010, 80 }, { 0x00000410, FC_CASE_FOLD_RANGE, 0x0020, 32 }, { 0x00000460, FC_CASE_FOLD_EVEN_ODD, 0x0021, 1 }, { 0x0000048a, FC_CASE_FOLD_EVEN_ODD, 0x0035, 1 }, { 0x000004c0, FC_CASE_FOLD_RANGE, 0x0001, 15 }, { 0x000004c1, FC_CASE_FOLD_EVEN_ODD, 0x000d, 1 }, { 0x000004d0, FC_CASE_FOLD_EVEN_ODD, 0x005f, 1 }, { 0x00000531, FC_CASE_FOLD_RANGE, 0x0026, 48 }, { 0x00000587, FC_CASE_FOLD_FULL, 0x0004, 23 }, { 0x000010a0, FC_CASE_FOLD_RANGE, 0x0026, 7264 }, { 0x000010c7, FC_CASE_FOLD_RANGE, 0x0001, 7264 }, { 0x000010cd, FC_CASE_FOLD_RANGE, 0x0001, 7264 }, { 0x000013f8, FC_CASE_FOLD_RANGE, 0x0006, -8 }, { 0x00001c80, FC_CASE_FOLD_RANGE, 0x0001, -6222 }, { 0x00001c81, FC_CASE_FOLD_RANGE, 0x0001, -6221 }, { 0x00001c82, FC_CASE_FOLD_RANGE, 0x0001, -6212 }, { 0x00001c83, FC_CASE_FOLD_RANGE, 0x0002, -6210 }, { 0x00001c85, FC_CASE_FOLD_RANGE, 0x0001, -6211 }, { 0x00001c86, FC_CASE_FOLD_RANGE, 0x0001, -6204 }, { 0x00001c87, FC_CASE_FOLD_RANGE, 0x0001, -6180 }, { 0x00001c88, FC_CASE_FOLD_RANGE, 0x0001, -30269 }, { 0x00001c90, FC_CASE_FOLD_RANGE, 0x002b, -3008 }, { 0x00001cbd, FC_CASE_FOLD_RANGE, 0x0003, -3008 }, { 0x00001e00, FC_CASE_FOLD_EVEN_ODD, 0x0095, 1 }, { 0x00001e96, FC_CASE_FOLD_FULL, 0x0003, 27 }, { 0x00001e97, FC_CASE_FOLD_FULL, 0x0003, 30 }, { 0x00001e98, FC_CASE_FOLD_FULL, 0x0003, 33 }, { 0x00001e99, FC_CASE_FOLD_FULL, 0x0003, 36 }, { 0x00001e9a, FC_CASE_FOLD_FULL, 0x0003, 39 }, { 0x00001e9b, FC_CASE_FOLD_RANGE, 0x0001, -58 }, { 0x00001e9e, FC_CASE_FOLD_FULL, 0x0002, 42 }, { 0x00001ea0, FC_CASE_FOLD_EVEN_ODD, 0x005f, 1 }, { 0x00001f08, FC_CASE_FOLD_RANGE, 0x0008, -8 }, { 0x00001f18, FC_CASE_FOLD_RANGE, 0x0006, -8 }, { 0x00001f28, FC_CASE_FOLD_RANGE, 0x0008, -8 }, { 0x00001f38, FC_CASE_FOLD_RANGE, 0x0008, -8 }, { 0x00001f48, FC_CASE_FOLD_RANGE, 0x0006, -8 }, { 0x00001f50, FC_CASE_FOLD_FULL, 0x0004, 44 }, { 0x00001f52, FC_CASE_FOLD_FULL, 0x0006, 48 }, { 0x00001f54, FC_CASE_FOLD_FULL, 0x0006, 54 }, { 0x00001f56, FC_CASE_FOLD_FULL, 0x0006, 60 }, { 0x00001f59, FC_CASE_FOLD_RANGE, 0x0001, -8 }, { 0x00001f5b, FC_CASE_FOLD_RANGE, 0x0001, -8 }, { 0x00001f5d, FC_CASE_FOLD_RANGE, 0x0001, -8 }, { 0x00001f5f, FC_CASE_FOLD_RANGE, 0x0001, -8 }, { 0x00001f68, FC_CASE_FOLD_RANGE, 0x0008, -8 }, { 0x00001f80, FC_CASE_FOLD_FULL, 0x0005, 66 }, { 0x00001f81, FC_CASE_FOLD_FULL, 0x0005, 71 }, { 0x00001f82, FC_CASE_FOLD_FULL, 0x0005, 76 }, { 0x00001f83, FC_CASE_FOLD_FULL, 0x0005, 81 }, { 0x00001f84, FC_CASE_FOLD_FULL, 0x0005, 86 }, { 0x00001f85, FC_CASE_FOLD_FULL, 0x0005, 91 }, { 0x00001f86, FC_CASE_FOLD_FULL, 0x0005, 96 }, { 0x00001f87, FC_CASE_FOLD_FULL, 0x0005, 101 }, { 0x00001f88, FC_CASE_FOLD_FULL, 0x0005, 106 }, { 0x00001f89, FC_CASE_FOLD_FULL, 0x0005, 111 }, { 0x00001f8a, FC_CASE_FOLD_FULL, 0x0005, 116 }, { 0x00001f8b, FC_CASE_FOLD_FULL, 0x0005, 121 }, { 0x00001f8c, FC_CASE_FOLD_FULL, 0x0005, 126 }, { 0x00001f8d, FC_CASE_FOLD_FULL, 0x0005, 131 }, { 0x00001f8e, FC_CASE_FOLD_FULL, 0x0005, 136 }, { 0x00001f8f, FC_CASE_FOLD_FULL, 0x0005, 141 }, { 0x00001f90, FC_CASE_FOLD_FULL, 0x0005, 146 }, { 0x00001f91, FC_CASE_FOLD_FULL, 0x0005, 151 }, { 0x00001f92, FC_CASE_FOLD_FULL, 0x0005, 156 }, { 0x00001f93, FC_CASE_FOLD_FULL, 0x0005, 161 }, { 0x00001f94, FC_CASE_FOLD_FULL, 0x0005, 166 }, { 0x00001f95, FC_CASE_FOLD_FULL, 0x0005, 171 }, { 0x00001f96, FC_CASE_FOLD_FULL, 0x0005, 176 }, { 0x00001f97, FC_CASE_FOLD_FULL, 0x0005, 181 }, { 0x00001f98, FC_CASE_FOLD_FULL, 0x0005, 186 }, { 0x00001f99, FC_CASE_FOLD_FULL, 0x0005, 191 }, { 0x00001f9a, FC_CASE_FOLD_FULL, 0x0005, 196 }, { 0x00001f9b, FC_CASE_FOLD_FULL, 0x0005, 201 }, { 0x00001f9c, FC_CASE_FOLD_FULL, 0x0005, 206 }, { 0x00001f9d, FC_CASE_FOLD_FULL, 0x0005, 211 }, { 0x00001f9e, FC_CASE_FOLD_FULL, 0x0005, 216 }, { 0x00001f9f, FC_CASE_FOLD_FULL, 0x0005, 221 }, { 0x00001fa0, FC_CASE_FOLD_FULL, 0x0005, 226 }, { 0x00001fa1, FC_CASE_FOLD_FULL, 0x0005, 231 }, { 0x00001fa2, FC_CASE_FOLD_FULL, 0x0005, 236 }, { 0x00001fa3, FC_CASE_FOLD_FULL, 0x0005, 241 }, { 0x00001fa4, FC_CASE_FOLD_FULL, 0x0005, 246 }, { 0x00001fa5, FC_CASE_FOLD_FULL, 0x0005, 251 }, { 0x00001fa6, FC_CASE_FOLD_FULL, 0x0005, 256 }, { 0x00001fa7, FC_CASE_FOLD_FULL, 0x0005, 261 }, { 0x00001fa8, FC_CASE_FOLD_FULL, 0x0005, 266 }, { 0x00001fa9, FC_CASE_FOLD_FULL, 0x0005, 271 }, { 0x00001faa, FC_CASE_FOLD_FULL, 0x0005, 276 }, { 0x00001fab, FC_CASE_FOLD_FULL, 0x0005, 281 }, { 0x00001fac, FC_CASE_FOLD_FULL, 0x0005, 286 }, { 0x00001fad, FC_CASE_FOLD_FULL, 0x0005, 291 }, { 0x00001fae, FC_CASE_FOLD_FULL, 0x0005, 296 }, { 0x00001faf, FC_CASE_FOLD_FULL, 0x0005, 301 }, { 0x00001fb2, FC_CASE_FOLD_FULL, 0x0005, 306 }, { 0x00001fb3, FC_CASE_FOLD_FULL, 0x0004, 311 }, { 0x00001fb4, FC_CASE_FOLD_FULL, 0x0004, 315 }, { 0x00001fb6, FC_CASE_FOLD_FULL, 0x0004, 319 }, { 0x00001fb7, FC_CASE_FOLD_FULL, 0x0006, 323 }, { 0x00001fb8, FC_CASE_FOLD_RANGE, 0x0002, -8 }, { 0x00001fba, FC_CASE_FOLD_RANGE, 0x0002, -74 }, { 0x00001fbc, FC_CASE_FOLD_FULL, 0x0004, 329 }, { 0x00001fbe, FC_CASE_FOLD_RANGE, 0x0001, -7173 }, { 0x00001fc2, FC_CASE_FOLD_FULL, 0x0005, 333 }, { 0x00001fc3, FC_CASE_FOLD_FULL, 0x0004, 338 }, { 0x00001fc4, FC_CASE_FOLD_FULL, 0x0004, 342 }, { 0x00001fc6, FC_CASE_FOLD_FULL, 0x0004, 346 }, { 0x00001fc7, FC_CASE_FOLD_FULL, 0x0006, 350 }, { 0x00001fc8, FC_CASE_FOLD_RANGE, 0x0004, -86 }, { 0x00001fcc, FC_CASE_FOLD_FULL, 0x0004, 356 }, { 0x00001fd2, FC_CASE_FOLD_FULL, 0x0006, 360 }, { 0x00001fd3, FC_CASE_FOLD_FULL, 0x0006, 366 }, { 0x00001fd6, FC_CASE_FOLD_FULL, 0x0004, 372 }, { 0x00001fd7, FC_CASE_FOLD_FULL, 0x0006, 376 }, { 0x00001fd8, FC_CASE_FOLD_RANGE, 0x0002, -8 }, { 0x00001fda, FC_CASE_FOLD_RANGE, 0x0002, -100 }, { 0x00001fe2, FC_CASE_FOLD_FULL, 0x0006, 382 }, { 0x00001fe3, FC_CASE_FOLD_FULL, 0x0006, 388 }, { 0x00001fe4, FC_CASE_FOLD_FULL, 0x0004, 394 }, { 0x00001fe6, FC_CASE_FOLD_FULL, 0x0004, 398 }, { 0x00001fe7, FC_CASE_FOLD_FULL, 0x0006, 402 }, { 0x00001fe8, FC_CASE_FOLD_RANGE, 0x0002, -8 }, { 0x00001fea, FC_CASE_FOLD_RANGE, 0x0002, -112 }, { 0x00001fec, FC_CASE_FOLD_RANGE, 0x0001, -7 }, { 0x00001ff2, FC_CASE_FOLD_FULL, 0x0005, 408 }, { 0x00001ff3, FC_CASE_FOLD_FULL, 0x0004, 413 }, { 0x00001ff4, FC_CASE_FOLD_FULL, 0x0004, 417 }, { 0x00001ff6, FC_CASE_FOLD_FULL, 0x0004, 421 }, { 0x00001ff7, FC_CASE_FOLD_FULL, 0x0006, 425 }, { 0x00001ff8, FC_CASE_FOLD_RANGE, 0x0002, -128 }, { 0x00001ffa, FC_CASE_FOLD_RANGE, 0x0002, -126 }, { 0x00001ffc, FC_CASE_FOLD_FULL, 0x0004, 431 }, { 0x00002126, FC_CASE_FOLD_RANGE, 0x0001, -7517 }, { 0x0000212a, FC_CASE_FOLD_RANGE, 0x0001, -8383 }, { 0x0000212b, FC_CASE_FOLD_RANGE, 0x0001, -8262 }, { 0x00002132, FC_CASE_FOLD_RANGE, 0x0001, 28 }, { 0x00002160, FC_CASE_FOLD_RANGE, 0x0010, 16 }, { 0x00002183, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x000024b6, FC_CASE_FOLD_RANGE, 0x001a, 26 }, { 0x00002c00, FC_CASE_FOLD_RANGE, 0x0030, 48 }, { 0x00002c60, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x00002c62, FC_CASE_FOLD_RANGE, 0x0001, -10743 }, { 0x00002c63, FC_CASE_FOLD_RANGE, 0x0001, -3814 }, { 0x00002c64, FC_CASE_FOLD_RANGE, 0x0001, -10727 }, { 0x00002c67, FC_CASE_FOLD_EVEN_ODD, 0x0005, 1 }, { 0x00002c6d, FC_CASE_FOLD_RANGE, 0x0001, -10780 }, { 0x00002c6e, FC_CASE_FOLD_RANGE, 0x0001, -10749 }, { 0x00002c6f, FC_CASE_FOLD_RANGE, 0x0001, -10783 }, { 0x00002c70, FC_CASE_FOLD_RANGE, 0x0001, -10782 }, { 0x00002c72, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x00002c75, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x00002c7e, FC_CASE_FOLD_RANGE, 0x0002, -10815 }, { 0x00002c80, FC_CASE_FOLD_EVEN_ODD, 0x0063, 1 }, { 0x00002ceb, FC_CASE_FOLD_EVEN_ODD, 0x0003, 1 }, { 0x00002cf2, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x0000a640, FC_CASE_FOLD_EVEN_ODD, 0x002d, 1 }, { 0x0000a680, FC_CASE_FOLD_EVEN_ODD, 0x001b, 1 }, { 0x0000a722, FC_CASE_FOLD_EVEN_ODD, 0x000d, 1 }, { 0x0000a732, FC_CASE_FOLD_EVEN_ODD, 0x003d, 1 }, { 0x0000a779, FC_CASE_FOLD_EVEN_ODD, 0x0003, 1 }, { 0x0000a77d, FC_CASE_FOLD_RANGE, 0x0001, 30204 }, { 0x0000a77e, FC_CASE_FOLD_EVEN_ODD, 0x0009, 1 }, { 0x0000a78b, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x0000a78d, FC_CASE_FOLD_RANGE, 0x0001, 23256 }, { 0x0000a790, FC_CASE_FOLD_EVEN_ODD, 0x0003, 1 }, { 0x0000a796, FC_CASE_FOLD_EVEN_ODD, 0x0013, 1 }, { 0x0000a7aa, FC_CASE_FOLD_RANGE, 0x0001, 23228 }, { 0x0000a7ab, FC_CASE_FOLD_RANGE, 0x0001, 23217 }, { 0x0000a7ac, FC_CASE_FOLD_RANGE, 0x0001, 23221 }, { 0x0000a7ad, FC_CASE_FOLD_RANGE, 0x0001, 23231 }, { 0x0000a7ae, FC_CASE_FOLD_RANGE, 0x0001, 23228 }, { 0x0000a7b0, FC_CASE_FOLD_RANGE, 0x0001, 23278 }, { 0x0000a7b1, FC_CASE_FOLD_RANGE, 0x0001, 23254 }, { 0x0000a7b2, FC_CASE_FOLD_RANGE, 0x0001, 23275 }, { 0x0000a7b3, FC_CASE_FOLD_RANGE, 0x0001, 928 }, { 0x0000a7b4, FC_CASE_FOLD_EVEN_ODD, 0x000f, 1 }, { 0x0000a7c4, FC_CASE_FOLD_RANGE, 0x0001, -48 }, { 0x0000a7c5, FC_CASE_FOLD_RANGE, 0x0001, 23229 }, { 0x0000a7c6, FC_CASE_FOLD_RANGE, 0x0001, 30152 }, { 0x0000a7c7, FC_CASE_FOLD_EVEN_ODD, 0x0003, 1 }, { 0x0000a7d0, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x0000a7d6, FC_CASE_FOLD_EVEN_ODD, 0x0003, 1 }, { 0x0000a7f5, FC_CASE_FOLD_EVEN_ODD, 0x0001, 1 }, { 0x0000ab70, FC_CASE_FOLD_RANGE, 0x0050, 26672 }, { 0x0000fb00, FC_CASE_FOLD_FULL, 0x0002, 435 }, { 0x0000fb01, FC_CASE_FOLD_FULL, 0x0002, 437 }, { 0x0000fb02, FC_CASE_FOLD_FULL, 0x0002, 439 }, { 0x0000fb03, FC_CASE_FOLD_FULL, 0x0003, 441 }, { 0x0000fb04, FC_CASE_FOLD_FULL, 0x0003, 444 }, { 0x0000fb05, FC_CASE_FOLD_FULL, 0x0002, 447 }, { 0x0000fb06, FC_CASE_FOLD_FULL, 0x0002, 449 }, { 0x0000fb13, FC_CASE_FOLD_FULL, 0x0004, 451 }, { 0x0000fb14, FC_CASE_FOLD_FULL, 0x0004, 455 }, { 0x0000fb15, FC_CASE_FOLD_FULL, 0x0004, 459 }, { 0x0000fb16, FC_CASE_FOLD_FULL, 0x0004, 463 }, { 0x0000fb17, FC_CASE_FOLD_FULL, 0x0004, 467 }, { 0x0000ff21, FC_CASE_FOLD_RANGE, 0x001a, 32 }, { 0x00010400, FC_CASE_FOLD_RANGE, 0x0028, 40 }, { 0x000104b0, FC_CASE_FOLD_RANGE, 0x0024, 40 }, { 0x00010570, FC_CASE_FOLD_RANGE, 0x000b, 39 }, { 0x0001057c, FC_CASE_FOLD_RANGE, 0x000f, 39 }, { 0x0001058c, FC_CASE_FOLD_RANGE, 0x0007, 39 }, { 0x00010594, FC_CASE_FOLD_RANGE, 0x0002, 39 }, { 0x00010c80, FC_CASE_FOLD_RANGE, 0x0033, 64 }, { 0x000118a0, FC_CASE_FOLD_RANGE, 0x0020, 32 }, { 0x00016e40, FC_CASE_FOLD_RANGE, 0x0020, 32 }, { 0x0001e900, FC_CASE_FOLD_RANGE, 0x0022, 34 }, }; static const FcChar8 fcCaseFoldChars[FC_NUM_CASE_FOLD_CHARS] = { 0x73,0x73,0x69,0xcc,0x87,0xca,0xbc,0x6e,0x6a,0xcc,0x8c,0xce,0xb9,0xcc,0x88,0xcc, 0x81,0xcf,0x85,0xcc,0x88,0xcc,0x81,0xd5,0xa5,0xd6,0x82,0x68,0xcc,0xb1,0x74,0xcc, 0x88,0x77,0xcc,0x8a,0x79,0xcc,0x8a,0x61,0xca,0xbe,0x73,0x73,0xcf,0x85,0xcc,0x93, 0xcf,0x85,0xcc,0x93,0xcc,0x80,0xcf,0x85,0xcc,0x93,0xcc,0x81,0xcf,0x85,0xcc,0x93, 0xcd,0x82,0xe1,0xbc,0x80,0xce,0xb9,0xe1,0xbc,0x81,0xce,0xb9,0xe1,0xbc,0x82,0xce, 0xb9,0xe1,0xbc,0x83,0xce,0xb9,0xe1,0xbc,0x84,0xce,0xb9,0xe1,0xbc,0x85,0xce,0xb9, 0xe1,0xbc,0x86,0xce,0xb9,0xe1,0xbc,0x87,0xce,0xb9,0xe1,0xbc,0x80,0xce,0xb9,0xe1, 0xbc,0x81,0xce,0xb9,0xe1,0xbc,0x82,0xce,0xb9,0xe1,0xbc,0x83,0xce,0xb9,0xe1,0xbc, 0x84,0xce,0xb9,0xe1,0xbc,0x85,0xce,0xb9,0xe1,0xbc,0x86,0xce,0xb9,0xe1,0xbc,0x87, 0xce,0xb9,0xe1,0xbc,0xa0,0xce,0xb9,0xe1,0xbc,0xa1,0xce,0xb9,0xe1,0xbc,0xa2,0xce, 0xb9,0xe1,0xbc,0xa3,0xce,0xb9,0xe1,0xbc,0xa4,0xce,0xb9,0xe1,0xbc,0xa5,0xce,0xb9, 0xe1,0xbc,0xa6,0xce,0xb9,0xe1,0xbc,0xa7,0xce,0xb9,0xe1,0xbc,0xa0,0xce,0xb9,0xe1, 0xbc,0xa1,0xce,0xb9,0xe1,0xbc,0xa2,0xce,0xb9,0xe1,0xbc,0xa3,0xce,0xb9,0xe1,0xbc, 0xa4,0xce,0xb9,0xe1,0xbc,0xa5,0xce,0xb9,0xe1,0xbc,0xa6,0xce,0xb9,0xe1,0xbc,0xa7, 0xce,0xb9,0xe1,0xbd,0xa0,0xce,0xb9,0xe1,0xbd,0xa1,0xce,0xb9,0xe1,0xbd,0xa2,0xce, 0xb9,0xe1,0xbd,0xa3,0xce,0xb9,0xe1,0xbd,0xa4,0xce,0xb9,0xe1,0xbd,0xa5,0xce,0xb9, 0xe1,0xbd,0xa6,0xce,0xb9,0xe1,0xbd,0xa7,0xce,0xb9,0xe1,0xbd,0xa0,0xce,0xb9,0xe1, 0xbd,0xa1,0xce,0xb9,0xe1,0xbd,0xa2,0xce,0xb9,0xe1,0xbd,0xa3,0xce,0xb9,0xe1,0xbd, 0xa4,0xce,0xb9,0xe1,0xbd,0xa5,0xce,0xb9,0xe1,0xbd,0xa6,0xce,0xb9,0xe1,0xbd,0xa7, 0xce,0xb9,0xe1,0xbd,0xb0,0xce,0xb9,0xce,0xb1,0xce,0xb9,0xce,0xac,0xce,0xb9,0xce, 0xb1,0xcd,0x82,0xce,0xb1,0xcd,0x82,0xce,0xb9,0xce,0xb1,0xce,0xb9,0xe1,0xbd,0xb4, 0xce,0xb9,0xce,0xb7,0xce,0xb9,0xce,0xae,0xce,0xb9,0xce,0xb7,0xcd,0x82,0xce,0xb7, 0xcd,0x82,0xce,0xb9,0xce,0xb7,0xce,0xb9,0xce,0xb9,0xcc,0x88,0xcc,0x80,0xce,0xb9, 0xcc,0x88,0xcc,0x81,0xce,0xb9,0xcd,0x82,0xce,0xb9,0xcc,0x88,0xcd,0x82,0xcf,0x85, 0xcc,0x88,0xcc,0x80,0xcf,0x85,0xcc,0x88,0xcc,0x81,0xcf,0x81,0xcc,0x93,0xcf,0x85, 0xcd,0x82,0xcf,0x85,0xcc,0x88,0xcd,0x82,0xe1,0xbd,0xbc,0xce,0xb9,0xcf,0x89,0xce, 0xb9,0xcf,0x8e,0xce,0xb9,0xcf,0x89,0xcd,0x82,0xcf,0x89,0xcd,0x82,0xce,0xb9,0xcf, 0x89,0xce,0xb9,0x66,0x66,0x66,0x69,0x66,0x6c,0x66,0x66,0x69,0x66,0x66,0x6c,0x73, 0x74,0x73,0x74,0xd5,0xb4,0xd5,0xb6,0xd5,0xb4,0xd5,0xa5,0xd5,0xb4,0xd5,0xab,0xd5, 0xbe,0xd5,0xb6,0xd5,0xb4,0xd5,0xad };
7b24b5a7912cd68c403ba41647ede53e7175db18
58fe7cb3949dd1930e709696659a0296500b64a6
/tests/cbmc/stubs/open.c
49550bba5bd98d67fcdd05431712edeb37982826
[ "Apache-2.0", "MIT" ]
permissive
aws/s2n-tls
3344638a6a69c6f20665cf6847e1bc4b85f2e558
62dc7a6d4876e5eee0dea3690d528a4c7080a1d5
refs/heads/main
2023-08-31T23:26:33.780048
2023-08-31T05:17:33
2023-08-31T05:17:33
21,287,076
513
213
Apache-2.0
2023-09-13T23:52:29
2014-06-27T19:37:59
C
UTF-8
C
false
false
1,132
c
open.c
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use * this file except in compliance with the License. A copy of the License is * located at * * http://aws.amazon.com/apache2.0/ * * or in the "license" file accompanying this file. This file is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing permissions and * limitations under the License. */ #include <assert.h> #include <cbmc_proof/nondet.h> #include <errno.h> #include <sys/fcntl.h> static bool loop_flag = false; int open(const char *path, int flag, ...) { assert(path != NULL); assert(flag == O_RDONLY || flag == O_WRONLY || flag == O_RDWR); int rval = 0; errno = nondet_int(); if (loop_flag) { __CPROVER_assume(errno != EINTR); return rval; } loop_flag = true; rval = nondet_int(); __CPROVER_assume(rval >= -1 && rval <= 65536 /* File descriptor limit. */); return rval; }
fd8ebae4b6443142f580d3ac06ee155cb8e89998
b4c2b8dc89417e966a67a433267ebb9c156dbff4
/src/vehicles/sounds/MGBGtV8idle.h
94d01c442eaadd7275271ae5c8eb696590e8f171
[]
no_license
TheDIYGuy999/Rc_Engine_Sound_ESP32
92134030dbc047627310d54ccf1fd34fb3cad791
eeeb47964861b66f8e1db34bffe35657846d8b20
refs/heads/master
2023-08-31T00:17:03.698027
2023-05-04T19:46:51
2023-05-04T19:46:51
225,658,413
230
105
null
2023-08-26T14:38:39
2019-12-03T15:51:13
C
UTF-8
C
false
false
12,330
h
MGBGtV8idle.h
const unsigned int sampleRate = 22050; const unsigned int sampleCount = 2682; const signed char samples[] = { 0, 2, 5, 8, 11, 13, 18, 21, 24, 25, 27, 29, 31, 33, 38, 41, 41, 43, 45, 48, 50, 49, 48, 48, 51, 53, 54, 55, 56, 57, 57, 57, 58, 58, 59, 59, 58, 59, 58, 58, 60, 61, 62, 61, 59, 56, 56, 57, 55, 53, 52, 51, 52, 54, 51, 47, 46, 43, 39, 40, 41, 39, 38, 34, 32, 31, 32, 32, 28, 27, 26, 25, 24, 21, 18, 18, 16, 14, 13, 10, 8, 8, 7, 6, 2, 0, 0, -1, -2, -3, -5, -7, -9, -9, -11, -14, -15, -15, -16, -18, -19, -18, -20, -21, -17, -17, -20, -19, -13, -13, -16, -17, -14, -10, -12, -14, -13, -11, -8, -2, -3, -5, -5, -4, -1, -1, -1, 2, 2, -1, -2, 2, 3, 2, 6, 5, 5, 10, 9, 11, 13, 16, 14, 12, 14, 15, 14, 13, 15, 11, 6, 2, 5, 9, 9, 11, 7, 2, 2, 5, 8, 7, 2, 1, -1, -8, -5, -2, -4, -3, -6, -10, -11, -8, -4, -7, -5, -3, -9, -11, -10, -13, -13, -14, -14, -14, -14, -13, -11, -14, -18, -16, -11, -8, -8, -5, -3, -4, -1, 4, 6, 4, 3, 5, 7, 7, 7, 9, 8, 8, 9, 11, 14, 13, 11, 11, 15, 19, 20, 20, 20, 22, 25, 24, 23, 25, 24, 23, 25, 23, 17, 15, 17, 15, 15, 14, 13, 13, 9, 9, 8, 5, 3, 1, 1, 0, -2, -2, -5, -9, -8, -11, -14, -16, -19, -22, -25, -24, -25, -29, -29, -31, -33, -34, -37, -40, -46, -51, -55, -56, -58, -59, -60, -62, -64, -65, -64, -66, -66, -66, -68, -70, -73, -73, -71, -71, -73, -73, -75, -78, -77, -77, -79, -79, -79, -80, -77, -76, -73, -70, -71, -74, -77, -76, -75, -73, -66, -66, -67, -64, -63, -60, -55, -54, -53, -51, -50, -46, -43, -40, -35, -35, -34, -31, -28, -25, -23, -20, -21, -20, -16, -11, -7, -3, 6, 9, 9, 10, 13, 15, 16, 22, 27, 28, 29, 33, 36, 37, 36, 37, 38, 39, 40, 43, 45, 47, 48, 49, 49, 48, 51, 52, 53, 50, 49, 51, 51, 50, 50, 50, 51, 49, 48, 48, 44, 46, 48, 47, 48, 49, 48, 45, 45, 47, 44, 42, 41, 41, 41, 41, 41, 40, 40, 39, 39, 38, 34, 34, 34, 36, 37, 37, 41, 42, 41, 40, 40, 40, 40, 39, 39, 42, 42, 38, 38, 38, 38, 39, 40, 37, 33, 32, 34, 33, 32, 31, 31, 30, 31, 32, 34, 32, 31, 29, 30, 35, 35, 34, 31, 27, 27, 28, 28, 26, 23, 21, 20, 19, 18, 15, 13, 12, 10, 15, 20, 19, 18, 17, 10, 9, 7, 7, 11, 15, 16, 13, 9, 8, 9, 9, 10, 8, 8, 8, 7, 3, 0, -5, -10, -12, -13, -10, -2, 0, -6, -15, -19, -23, -23, -18, -15, -17, -21, -25, -29, -31, -31, -33, -34, -39, -43, -40, -36, -36, -34, -33, -35, -37, -38, -36, -35, -35, -38, -46, -49, -45, -50, -46, -41, -38, -37, -38, -37, -35, -30, -24, -24, -23, -24, -23, -22, -21, -16, -16, -15, -17, -20, -15, -9, -6, 0, 1, -1, 3, 6, 8, 8, 8, 7, 4, 6, 4, 3, 7, 9, 7, 5, 6, 5, 6, 8, 8, 10, 11, 14, 16, 14, 14, 12, 12, 15, 17, 16, 13, 13, 12, 8, 3, 2, 1, -1, -2, -1, 2, 0, -3, -3, -8, -12, -13, -11, -9, -8, -7, -11, -11, -11, -9, -9, -12, -15, -18, -21, -25, -26, -27, -30, -31, -31, -33, -34, -38, -38, -40, -44, -46, -48, -49, -51, -53, -54, -58, -59, -60, -57, -55, -58, -60, -63, -61, -58, -59, -61, -63, -64, -66, -69, -68, -67, -69, -67, -66, -67, -66, -64, -59, -58, -59, -57, -57, -59, -61, -60, -56, -51, -51, -55, -56, -56, -55, -55, -53, -52, -49, -44, -41, -39, -37, -36, -33, -33, -30, -26, -25, -25, -24, -23, -22, -22, -19, -16, -12, -8, -3, 3, 6, 11, 15, 16, 18, 25, 30, 34, 37, 39, 43, 48, 49, 54, 61, 64, 63, 65, 69, 73, 76, 79, 83, 86, 89, 89, 92, 94, 97, 99, 99, 100, 100, 101, 102, 104, 104, 101, 99, 96, 95, 90, 87, 88, 87, 84, 84, 84, 84, 81, 78, 75, 72, 70, 71, 70, 65, 64, 63, 62, 61, 57, 51, 50, 47, 43, 41, 36, 33, 30, 26, 21, 18, 19, 20, 17, 11, 8, 10, 17, 16, 15, 16, 15, 10, 11, 11, 9, 7, 3, 0, 2, 4, 2, 0, 1, -1, -1, 1, 3, 2, 1, 1, 1, -1, -2, 0, 4, 2, -4, -4, 1, 2, 1, 0, -3, 2, 9, 8, 10, 14, 15, 14, 13, 12, 16, 19, 21, 18, 13, 8, 7, 10, 12, 12, 18, 16, 12, 14, 15, 15, 17, 15, 12, 12, 15, 16, 19, 16, 12, 11, 12, 13, 13, 14, 11, 9, 5, -4, -3, -2, -7, -10, -9, -13, -16, -19, -22, -25, -30, -31, -32, -34, -36, -38, -37, -36, -40, -40, -40, -38, -37, -41, -43, -42, -40, -41, -44, -46, -45, -43, -41, -42, -41, -40, -39, -37, -33, -35, -34, -31, -30, -29, -29, -26, -25, -25, -22, -17, -16, -15, -14, -13, -13, -12, -10, -9, -8, -7, -7, -5, -5, -4, -4, -4, -1, 2, 0, -4, -8, -9, -11, -10, -10, -12, -14, -16, -18, -15, -13, -14, -15, -15, -17, -18, -18, -19, -21, -22, -24, -23, -23, -26, -28, -28, -28, -29, -32, -33, -34, -37, -36, -40, -40, -41, -45, -46, -49, -48, -48, -50, -51, -52, -53, -50, -48, -48, -47, -46, -45, -44, -43, -46, -47, -46, -48, -51, -53, -58, -60, -58, -57, -58, -59, -59, -58, -56, -55, -54, -54, -52, -51, -49, -48, -48, -44, -41, -38, -38, -37, -34, -32, -31, -32, -33, -30, -24, -22, -21, -21, -20, -19, -14, -11, -10, -9, -7, -7, -4, -1, 3, 6, 5, 6, 9, 13, 16, 16, 16, 18, 21, 24, 25, 28, 33, 34, 35, 35, 35, 37, 40, 39, 40, 42, 42, 43, 42, 42, 44, 48, 49, 47, 47, 47, 49, 52, 50, 49, 52, 53, 52, 50, 48, 51, 53, 54, 52, 49, 50, 49, 48, 48, 49, 47, 46, 45, 44, 46, 45, 43, 43, 43, 42, 42, 43, 45, 46, 48, 47, 49, 51, 54, 55, 54, 53, 52, 53, 55, 56, 58, 58, 54, 54, 55, 54, 54, 56, 59, 57, 55, 58, 62, 63, 64, 67, 66, 66, 64, 64, 67, 66, 67, 67, 63, 63, 65, 60, 58, 56, 55, 53, 47, 45, 42, 40, 39, 36, 33, 29, 26, 30, 30, 19, 16, 16, 15, 13, 11, 9, 9, 5, -2, -4, -4, -7, -8, -9, -15, -18, -22, -23, -23, -30, -37, -39, -36, -37, -39, -38, -40, -43, -43, -42, -38, -33, -32, -35, -34, -37, -38, -34, -34, -35, -36, -34, -34, -37, -42, -40, -37, -36, -37, -37, -35, -35, -33, -31, -32, -34, -33, -34, -30, -28, -31, -26, -29, -33, -30, -25, -21, -18, -19, -19, -16, -12, -14, -15, -13, -13, -15, -19, -22, -21, -18, -14, -14, -15, -13, -10, -10, -12, -14, -9, -8, -9, -10, -9, -6, -5, -6, -9, -9, -4, -3, -4, -6, -8, -10, -13, -18, -17, -16, -16, -15, -16, -17, -17, -18, -21, -23, -24, -26, -28, -28, -31, -33, -34, -35, -35, -36, -35, -36, -38, -39, -40, -40, -43, -45, -41, -39, -37, -36, -38, -39, -41, -45, -43, -42, -43, -42, -43, -43, -43, -43, -44, -42, -41, -41, -42, -41, -42, -44, -45, -45, -46, -45, -45, -44, -41, -37, -37, -37, -37, -40, -38, -35, -34, -32, -34, -37, -37, -38, -38, -37, -36, -37, -41, -42, -43, -42, -44, -47, -45, -41, -37, -37, -37, -36, -35, -33, -35, -35, -32, -30, -29, -30, -31, -30, -29, -26, -24, -24, -21, -20, -20, -20, -21, -14, -10, -5, -2, -3, 3, 4, 3, 4, 5, 9, 14, 13, 15, 18, 20, 19, 20, 23, 28, 32, 35, 40, 42, 43, 46, 51, 52, 53, 56, 61, 63, 61, 63, 65, 65, 66, 68, 71, 71, 72, 73, 73, 75, 77, 79, 81, 81, 80, 82, 83, 86, 86, 86, 86, 84, 84, 83, 82, 83, 82, 81, 79, 78, 79, 76, 74, 72, 68, 66, 63, 61, 61, 58, 57, 54, 50, 46, 45, 45, 43, 41, 39, 36, 34, 29, 28, 27, 26, 26, 26, 25, 23, 20, 16, 14, 11, 11, 9, 8, 10, 8, 4, 2, 1, 0, -1, -1, -2, -3, -4, -4, -5, -8, -6, -3, -3, -3, -4, -3, -3, -4, -2, 0, -3, -4, -3, -3, -2, -4, -9, -11, -14, -13, -13, -15, -18, -18, -18, -18, -19, -22, -23, -25, -22, -18, -15, -16, -18, -22, -20, -15, -14, -12, -15, -17, -14, -12, -14, -20, -23, -23, -24, -20, -16, -13, -10, -11, -12, -11, -6, -2, -3, -3, -2, 1, 3, -3, -5, 0, -1, -10, -9, -9, -9, -6, 1, 3, 6, 2, -7, -10, -15, -15, -7, 1, -5, -13, -14, -22, -30, -32, -31, -27, -23, -24, -22, -19, -26, -36, -37, -41, -45, -44, -41, -43, -45, -48, -53, -57, -58, -52, -45, -39, -37, -41, -46, -46, -47, -43, -39, -37, -34, -33, -31, -27, -24, -25, -27, -26, -24, -24, -24, -21, -16, -10, -2, 4, 6, 9, 12, 13, 15, 16, 20, 23, 26, 27, 26, 25, 28, 28, 30, 33, 32, 35, 37, 36, 33, 32, 31, 32, 32, 28, 30, 35, 34, 31, 32, 31, 31, 31, 23, 22, 21, 18, 10, 6, 1, -3, -5, -5, -9, -14, -15, -15, -19, -18, -17, -18, -21, -28, -33, -37, -39, -44, -48, -51, -56, -62, -66, -69, -77, -84, -83, -83, -83, -78, -75, -77, -81, -83, -89, -88, -85, -87, -91, -95, -104, -105, -104, -102, -98, -92, -90, -89, -89, -90, -93, -94, -92, -91, -88, -82, -80, -80, -77, -71, -68, -66, -59, -55, -50, -45, -41, -40, -40, -36, -32, -26, -21, -19, -13, -12, -12, -8, -3, 1, 4, 6, 10, 15, 22, 27, 28, 31, 31, 34, 40, 49, 51, 54, 57, 61, 63, 65, 69, 71, 72, 73, 78, 80, 80, 79, 81, 81, 82, 83, 85, 87, 88, 90, 90, 92, 94, 96, 97, 100, 101, 98, 100, 104, 107, 110, 110, 108, 105, 104, 104, 107, 109, 108, 107, 108, 109, 106, 102, 100, 99, 103, 103, 102, 101, 102, 98, 88, 86, 84, 82, 83, 81, 76, 74, 73, 71, 67, 60, 60, 61, 61, 62, 61, 58, 51, 45, 41, 39, 38, 36, 34, 28, 23, 20, 11, 5, 5, 6, 5, 3, -4, -4, -7, -13, -18, -21, -17, -19, -21, -22, -28, -36, -40, -43, -46, -47, -44, -49, -52, -52, -50, -47, -48, -46, -47, -53, -51, -45, -48, -52, -50, -49, -52, -52, -45, -40, -45, -48, -40, -37, -44, -41, -31, -24, -26, -22, -20, -19, -15, -13, -10, -2, -2, -2, 5, 8, 5, 12, 14, 13, 12, 14, 20, 21, 22, 21, 23, 26, 25, 27, 28, 26, 27, 30, 28, 27, 27, 28, 27, 24, 22, 23, 22, 17, 12, 4, -3, -9, -8, -6, -10, -9, -9, -10, -11, -11, -15, -12, -13, -19, -22, -22, -25, -27, -29, -30, -32, -31, -36, -39, -38, -41, -45, -47, -46, -45, -46, -44, -47, -48, -45, -45, -46, -46, -43, -41, -45, -46, -43, -41, -41, -42, -44, -42, -40, -39, -37, -36, -36, -37, -36, -39, -41, -41, -40, -41, -45, -46, -45, -46, -49, -48, -47, -53, -53, -54, -54, -54, -54, -55, -57, -57, -59, -61, -61, -60, -60, -59, -59, -58, -61, -63, -64, -65, -65, -67, -65, -63, -65, -66, -67, -69, -69, -72, -73, -71, -68, -67, -70, -72, -74, -75, -73, -72, -68, -66, -67, -67, -70, -69, -66, -64, -61, -61, -60, -59, -60, -58, -55, -54, -54, -52, -49, -48, -46, -42, -37, -35, -34, -30, -26, -23, -18, -17, -16, -12, -8, -6, -3, -1, 0, 1, 7, 9, 11, 15, 20, 25, 26, 28, 31, 35, 37, 39, 41, 43, 47, 49, 51, 55, 57, 56, 58, 62, 63, 64, 68, 70, 69, 69, 71, 73, 75, 77, 78, 79, 77, 78, 80, 82, 82, 79, 78, 79, 81, 83, 85, 83, 80, 80, 80, 80, 81, 82, 83, 87, 87, 86, 87, 88, 89, 89, 89, 89, 86, 87, 88, 86, 86, 86, 87, 89, 86, 84, 83, 80, 79, 78, 79, 79, 77, 80, 80, 78, 77, 75, 74, 69, 67, 68, 67, 67, 62, 61, 58, 54, 53, 51, 48, 46, 43, 42, 40, 39, 39, 36, 35, 34, 34, 29, 27, 25, 21, 18, 15, 14, 12, 10, 6, 1, 0, 1, 0, -2, -5, -5, -7, -7, -7, -10, -10, -9, -12, -17, -15, -14, -16, -14, -20, -19, -16, -19, -22, -22, -19, -20, -23, -22, -22, -21, -18, -17, -21, -24, -25, -27, -28, -26, -22, -21, -17, -21, -20, -13, -13, -16, -15, -15, -17, -16, -14, -17, -14, -12, -19, -22, -17, -18, -16, -14, -17, -21, -20, -19, -21, -19, -18, -21, -24, -27, -30, -27, -28, -34, -38, -38, -38, -39, -42, -43, -43, -43, -43, -45, -43, -43, -46, -49, -49, -48, -50, -49, -51, -55, -55, -52, -53, -53, -52, -54, -53, -51, -54, -52, -49, -48, -49, -47, -45, -46, -44, -43, -42, -41, -37, -36, -36, -30, -28, -29, -28, -28, -27, -24, -23, -24, -24, -23, -22, -21, -19, -18, -16, -17, -19, -19, -18, -17, -15, -13, -13, -14, -10, -11, -14, -14, -12, -9, -10, -13, -14, -16, -19, -20, -19, -20, -24, -25, -26, -28, -30, -32, -34, -37, -36, -36, -38, -38, -39, -41, -42, -42, -40, -36, -36, -37, -38, -39, -41, -44, -45, -47, -49, -51, -54, -55, -58, -61, -59, -58, -59, -58, -59, -60, -60, -57, -56, -56, -54, -55, -55, -56, -58, -58, -58, -59, -58, -57, -57, -55, -54, -51, -47, -44, -44, -42, -40, -39, -37, -36, -32, -30, -27, -22, -18, -16, -14, -6, -4, -1, 2, 6, 13, 16, 19, 24, 30, 34, 39, 42, 47, 51, 54, 58, 64, 68, 73, 77, 81, 87, 91, 95, 96, 96, 100, 105, 107, 109, 109, 110, 114, 116, 117, 117, 119, 122, 123, 123, 123, 124, 125, 125, 122, 122, 122, 119, 116, 112, 108, 106, 103, 101, 100, 97, 95, 92, 89, 87, 86, 82, 79, 76, 73, 69, 66, 61, 57, 53, 47, 43, 39, 37, 37, 35, 31, 26, 22, 20, 17, 14, 10, 6, 5, 2, 0, -1, -3, -4, -7, -9, -10, -12, -14, -15, -15, -16, -17, -19, -22, -21, -22, -24, -24, -25, -27, -28, -26, -25, -28, -31, -35, -34, -32, -31, -30, -31, -32, -31, -30, -29, -28, -26, -25, -26, -26, -26, -26, -27, -25, -22, -23, -23, -20, -21, -20, -18, -17, -15, -15, -11, -8, -8, -7, -7, -3, -3, -3, 0, 1, 3, 5, 6, 9, 11, 13, 15, 15, 14, 12, 14, 16, 17, 17, 14, 11, 10, 14, 15, 16, 18, 19, 20, 17, 16, 15, 15, 14, 11, 12, 11, 10, 8, 6, 4, 5, 6, 5, 3, 2, -3, -6, -8, -9, -9, -9, -12, -14, -15, -15, -16, -19, -22, -24, -26, -27, -28, -31, -33, -33, -33, -36, -37, -34, -34, -35, -37, -39, -39, -39, -42, -43, -45, -44, -43, -43, -43, -44, -45, -45, -46, -47, -46, -46, -48, -48, -49, -49, -50, -52, -51, -51, -49, -47, -46, -48, -47, -46, -46, -46, -46, -48, -51, -51, -48, -47, -46, -45, -46, -45, -42, -39, -36, -34, -35, -34, -31, -29, -29, -26, -24, -24, -22, -20, -19, -14, -11, -8, -5, -4, -2, 0, };
df53e19e6def80a77b9160cd3a2dd8637cbd1653
88ae8695987ada722184307301e221e1ba3cc2fa
/third_party/ffmpeg/libavcodec/alacenc.c
9598e5861e530fa363749e0adcc002a6fbc6a03e
[ "LGPL-2.1-only", "LGPL-3.0-only", "LGPL-2.0-or-later", "GPL-1.0-or-later", "GPL-2.0-only", "LGPL-2.1-or-later", "GPL-3.0-or-later", "LGPL-3.0-or-later", "IJG", "LicenseRef-scancode-other-permissive", "MIT", "GPL-2.0-or-later", "Apache-2.0", "GPL-3.0-only", "BSD-3-Clause" ]
permissive
iridium-browser/iridium-browser
71d9c5ff76e014e6900b825f67389ab0ccd01329
5ee297f53dc7f8e70183031cff62f37b0f19d25f
refs/heads/master
2023-08-03T16:44:16.844552
2023-07-20T15:17:00
2023-07-23T16:09:30
220,016,632
341
40
BSD-3-Clause
2021-08-13T13:54:45
2019-11-06T14:32:31
null
UTF-8
C
false
false
21,950
c
alacenc.c
/* * ALAC audio encoder * Copyright (c) 2008 Jaikrishnan Menon <realityman@gmx.net> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "libavutil/opt.h" #include "avcodec.h" #include "codec_internal.h" #include "encode.h" #include "put_bits.h" #include "lpc.h" #include "mathops.h" #include "alac_data.h" #define DEFAULT_FRAME_SIZE 4096 #define ALAC_EXTRADATA_SIZE 36 #define ALAC_FRAME_HEADER_SIZE 55 #define ALAC_FRAME_FOOTER_SIZE 3 #define ALAC_ESCAPE_CODE 0x1FF #define ALAC_MAX_LPC_ORDER 30 #define DEFAULT_MAX_PRED_ORDER 6 #define DEFAULT_MIN_PRED_ORDER 4 #define ALAC_MAX_LPC_PRECISION 9 #define ALAC_MIN_LPC_SHIFT 0 #define ALAC_MAX_LPC_SHIFT 9 #define ALAC_CHMODE_LEFT_RIGHT 0 #define ALAC_CHMODE_LEFT_SIDE 1 #define ALAC_CHMODE_RIGHT_SIDE 2 #define ALAC_CHMODE_MID_SIDE 3 typedef struct RiceContext { int history_mult; int initial_history; int k_modifier; int rice_modifier; } RiceContext; typedef struct AlacLPCContext { int lpc_order; int lpc_coeff[ALAC_MAX_LPC_ORDER+1]; int lpc_quant; } AlacLPCContext; typedef struct AlacEncodeContext { const AVClass *class; AVCodecContext *avctx; int frame_size; /**< current frame size */ int verbatim; /**< current frame verbatim mode flag */ int compression_level; int min_prediction_order; int max_prediction_order; int max_coded_frame_size; int write_sample_size; int extra_bits; int32_t sample_buf[2][DEFAULT_FRAME_SIZE]; int32_t predictor_buf[2][DEFAULT_FRAME_SIZE]; int interlacing_shift; int interlacing_leftweight; PutBitContext pbctx; RiceContext rc; AlacLPCContext lpc[2]; LPCContext lpc_ctx; } AlacEncodeContext; static void init_sample_buffers(AlacEncodeContext *s, int channels, const uint8_t *samples[2]) { int ch, i; int shift = av_get_bytes_per_sample(s->avctx->sample_fmt) * 8 - s->avctx->bits_per_raw_sample; #define COPY_SAMPLES(type) do { \ for (ch = 0; ch < channels; ch++) { \ int32_t *bptr = s->sample_buf[ch]; \ const type *sptr = (const type *)samples[ch]; \ for (i = 0; i < s->frame_size; i++) \ bptr[i] = sptr[i] >> shift; \ } \ } while (0) if (s->avctx->sample_fmt == AV_SAMPLE_FMT_S32P) COPY_SAMPLES(int32_t); else COPY_SAMPLES(int16_t); } static void encode_scalar(AlacEncodeContext *s, int x, int k, int write_sample_size) { int divisor, q, r; k = FFMIN(k, s->rc.k_modifier); divisor = (1<<k) - 1; q = x / divisor; r = x % divisor; if (q > 8) { // write escape code and sample value directly put_bits(&s->pbctx, 9, ALAC_ESCAPE_CODE); put_bits(&s->pbctx, write_sample_size, x); } else { if (q) put_bits(&s->pbctx, q, (1<<q) - 1); put_bits(&s->pbctx, 1, 0); if (k != 1) { if (r > 0) put_bits(&s->pbctx, k, r+1); else put_bits(&s->pbctx, k-1, 0); } } } static void write_element_header(AlacEncodeContext *s, enum AlacRawDataBlockType element, int instance) { int encode_fs = 0; if (s->frame_size < DEFAULT_FRAME_SIZE) encode_fs = 1; put_bits(&s->pbctx, 3, element); // element type put_bits(&s->pbctx, 4, instance); // element instance put_bits(&s->pbctx, 12, 0); // unused header bits put_bits(&s->pbctx, 1, encode_fs); // Sample count is in the header put_bits(&s->pbctx, 2, s->extra_bits >> 3); // Extra bytes (for 24-bit) put_bits(&s->pbctx, 1, s->verbatim); // Audio block is verbatim if (encode_fs) put_bits32(&s->pbctx, s->frame_size); // No. of samples in the frame } static void calc_predictor_params(AlacEncodeContext *s, int ch) { int32_t coefs[MAX_LPC_ORDER][MAX_LPC_ORDER]; int shift[MAX_LPC_ORDER]; int opt_order; if (s->compression_level == 1) { s->lpc[ch].lpc_order = 6; s->lpc[ch].lpc_quant = 6; s->lpc[ch].lpc_coeff[0] = 160; s->lpc[ch].lpc_coeff[1] = -190; s->lpc[ch].lpc_coeff[2] = 170; s->lpc[ch].lpc_coeff[3] = -130; s->lpc[ch].lpc_coeff[4] = 80; s->lpc[ch].lpc_coeff[5] = -25; } else { opt_order = ff_lpc_calc_coefs(&s->lpc_ctx, s->sample_buf[ch], s->frame_size, s->min_prediction_order, s->max_prediction_order, ALAC_MAX_LPC_PRECISION, coefs, shift, FF_LPC_TYPE_LEVINSON, 0, ORDER_METHOD_EST, ALAC_MIN_LPC_SHIFT, ALAC_MAX_LPC_SHIFT, 1); s->lpc[ch].lpc_order = opt_order; s->lpc[ch].lpc_quant = shift[opt_order-1]; memcpy(s->lpc[ch].lpc_coeff, coefs[opt_order-1], opt_order*sizeof(int)); } } static int estimate_stereo_mode(int32_t *left_ch, int32_t *right_ch, int n) { int i, best; int32_t lt, rt; uint64_t sum[4]; uint64_t score[4]; /* calculate sum of 2nd order residual for each channel */ sum[0] = sum[1] = sum[2] = sum[3] = 0; for (i = 2; i < n; i++) { lt = left_ch[i] - 2 * left_ch[i - 1] + left_ch[i - 2]; rt = right_ch[i] - 2 * right_ch[i - 1] + right_ch[i - 2]; sum[2] += FFABS((lt + rt) >> 1); sum[3] += FFABS(lt - rt); sum[0] += FFABS(lt); sum[1] += FFABS(rt); } /* calculate score for each mode */ score[0] = sum[0] + sum[1]; score[1] = sum[0] + sum[3]; score[2] = sum[1] + sum[3]; score[3] = sum[2] + sum[3]; /* return mode with lowest score */ best = 0; for (i = 1; i < 4; i++) { if (score[i] < score[best]) best = i; } return best; } static void alac_stereo_decorrelation(AlacEncodeContext *s) { int32_t *left = s->sample_buf[0], *right = s->sample_buf[1]; int i, mode, n = s->frame_size; int32_t tmp; mode = estimate_stereo_mode(left, right, n); switch (mode) { case ALAC_CHMODE_LEFT_RIGHT: s->interlacing_leftweight = 0; s->interlacing_shift = 0; break; case ALAC_CHMODE_LEFT_SIDE: for (i = 0; i < n; i++) right[i] = left[i] - right[i]; s->interlacing_leftweight = 1; s->interlacing_shift = 0; break; case ALAC_CHMODE_RIGHT_SIDE: for (i = 0; i < n; i++) { tmp = right[i]; right[i] = left[i] - right[i]; left[i] = tmp + (right[i] >> 31); } s->interlacing_leftweight = 1; s->interlacing_shift = 31; break; default: for (i = 0; i < n; i++) { tmp = left[i]; left[i] = (tmp + right[i]) >> 1; right[i] = tmp - right[i]; } s->interlacing_leftweight = 1; s->interlacing_shift = 1; break; } } static void alac_linear_predictor(AlacEncodeContext *s, int ch) { int i; AlacLPCContext lpc = s->lpc[ch]; int32_t *residual = s->predictor_buf[ch]; if (lpc.lpc_order == 31) { residual[0] = s->sample_buf[ch][0]; for (i = 1; i < s->frame_size; i++) { residual[i] = s->sample_buf[ch][i ] - s->sample_buf[ch][i - 1]; } return; } // generalised linear predictor if (lpc.lpc_order > 0) { int32_t *samples = s->sample_buf[ch]; // generate warm-up samples residual[0] = samples[0]; for (i = 1; i <= lpc.lpc_order; i++) residual[i] = sign_extend(samples[i] - samples[i-1], s->write_sample_size); // perform lpc on remaining samples for (i = lpc.lpc_order + 1; i < s->frame_size; i++) { int sum = 1 << (lpc.lpc_quant - 1), res_val, j; for (j = 0; j < lpc.lpc_order; j++) { sum += (samples[lpc.lpc_order-j] - samples[0]) * lpc.lpc_coeff[j]; } sum >>= lpc.lpc_quant; sum += samples[0]; residual[i] = sign_extend(samples[lpc.lpc_order+1] - sum, s->write_sample_size); res_val = residual[i]; if (res_val) { int index = lpc.lpc_order - 1; int neg = (res_val < 0); while (index >= 0 && (neg ? (res_val < 0) : (res_val > 0))) { int val = samples[0] - samples[lpc.lpc_order - index]; int sign = (val ? FFSIGN(val) : 0); if (neg) sign *= -1; lpc.lpc_coeff[index] -= sign; val *= sign; res_val -= (val >> lpc.lpc_quant) * (lpc.lpc_order - index); index--; } } samples++; } } } static void alac_entropy_coder(AlacEncodeContext *s, int ch) { unsigned int history = s->rc.initial_history; int sign_modifier = 0, i, k; int32_t *samples = s->predictor_buf[ch]; for (i = 0; i < s->frame_size;) { int x; k = av_log2((history >> 9) + 3); x = -2 * (*samples) -1; x ^= x >> 31; samples++; i++; encode_scalar(s, x - sign_modifier, k, s->write_sample_size); history += x * s->rc.history_mult - ((history * s->rc.history_mult) >> 9); sign_modifier = 0; if (x > 0xFFFF) history = 0xFFFF; if (history < 128 && i < s->frame_size) { unsigned int block_size = 0; k = 7 - av_log2(history) + ((history + 16) >> 6); while (*samples == 0 && i < s->frame_size) { samples++; i++; block_size++; } encode_scalar(s, block_size, k, 16); sign_modifier = (block_size <= 0xFFFF); history = 0; } } } static void write_element(AlacEncodeContext *s, enum AlacRawDataBlockType element, int instance, const uint8_t *samples0, const uint8_t *samples1) { const uint8_t *samples[2] = { samples0, samples1 }; int i, j, channels; int prediction_type = 0; PutBitContext *pb = &s->pbctx; channels = element == TYPE_CPE ? 2 : 1; if (s->verbatim) { write_element_header(s, element, instance); /* samples are channel-interleaved in verbatim mode */ if (s->avctx->sample_fmt == AV_SAMPLE_FMT_S32P) { int shift = 32 - s->avctx->bits_per_raw_sample; const int32_t *samples_s32[2] = { (const int32_t *)samples0, (const int32_t *)samples1 }; for (i = 0; i < s->frame_size; i++) for (j = 0; j < channels; j++) put_sbits(pb, s->avctx->bits_per_raw_sample, samples_s32[j][i] >> shift); } else { const int16_t *samples_s16[2] = { (const int16_t *)samples0, (const int16_t *)samples1 }; for (i = 0; i < s->frame_size; i++) for (j = 0; j < channels; j++) put_sbits(pb, s->avctx->bits_per_raw_sample, samples_s16[j][i]); } } else { s->write_sample_size = s->avctx->bits_per_raw_sample - s->extra_bits + channels - 1; init_sample_buffers(s, channels, samples); write_element_header(s, element, instance); // extract extra bits if needed if (s->extra_bits) { uint32_t mask = (1 << s->extra_bits) - 1; for (j = 0; j < channels; j++) { int32_t *extra = s->predictor_buf[j]; int32_t *smp = s->sample_buf[j]; for (i = 0; i < s->frame_size; i++) { extra[i] = smp[i] & mask; smp[i] >>= s->extra_bits; } } } if (channels == 2) alac_stereo_decorrelation(s); else s->interlacing_shift = s->interlacing_leftweight = 0; put_bits(pb, 8, s->interlacing_shift); put_bits(pb, 8, s->interlacing_leftweight); for (i = 0; i < channels; i++) { calc_predictor_params(s, i); put_bits(pb, 4, prediction_type); put_bits(pb, 4, s->lpc[i].lpc_quant); put_bits(pb, 3, s->rc.rice_modifier); put_bits(pb, 5, s->lpc[i].lpc_order); // predictor coeff. table for (j = 0; j < s->lpc[i].lpc_order; j++) put_sbits(pb, 16, s->lpc[i].lpc_coeff[j]); } // write extra bits if needed if (s->extra_bits) { for (i = 0; i < s->frame_size; i++) { for (j = 0; j < channels; j++) { put_bits(pb, s->extra_bits, s->predictor_buf[j][i]); } } } // apply lpc and entropy coding to audio samples for (i = 0; i < channels; i++) { alac_linear_predictor(s, i); // TODO: determine when this will actually help. for now it's not used. if (prediction_type == 15) { // 2nd pass 1st order filter int32_t *residual = s->predictor_buf[i]; for (j = s->frame_size - 1; j > 0; j--) residual[j] -= residual[j - 1]; } alac_entropy_coder(s, i); } } } static int write_frame(AlacEncodeContext *s, AVPacket *avpkt, uint8_t * const *samples) { PutBitContext *pb = &s->pbctx; int channels = s->avctx->ch_layout.nb_channels; const enum AlacRawDataBlockType *ch_elements = ff_alac_channel_elements[channels - 1]; const uint8_t *ch_map = ff_alac_channel_layout_offsets[channels - 1]; int ch, element, sce, cpe; init_put_bits(pb, avpkt->data, avpkt->size); ch = element = sce = cpe = 0; while (ch < channels) { if (ch_elements[element] == TYPE_CPE) { write_element(s, TYPE_CPE, cpe, samples[ch_map[ch]], samples[ch_map[ch + 1]]); cpe++; ch += 2; } else { write_element(s, TYPE_SCE, sce, samples[ch_map[ch]], NULL); sce++; ch++; } element++; } put_bits(pb, 3, TYPE_END); flush_put_bits(pb); return put_bytes_output(pb); } static av_always_inline int get_max_frame_size(int frame_size, int ch, int bps) { int header_bits = 23 + 32 * (frame_size < DEFAULT_FRAME_SIZE); return FFALIGN(header_bits + bps * ch * frame_size + 3, 8) / 8; } static av_cold int alac_encode_close(AVCodecContext *avctx) { AlacEncodeContext *s = avctx->priv_data; ff_lpc_end(&s->lpc_ctx); return 0; } static av_cold int alac_encode_init(AVCodecContext *avctx) { AlacEncodeContext *s = avctx->priv_data; int ret; uint8_t *alac_extradata; avctx->frame_size = s->frame_size = DEFAULT_FRAME_SIZE; if (avctx->sample_fmt == AV_SAMPLE_FMT_S32P) { if (avctx->bits_per_raw_sample != 24) av_log(avctx, AV_LOG_WARNING, "encoding as 24 bits-per-sample\n"); avctx->bits_per_raw_sample = 24; } else { avctx->bits_per_raw_sample = 16; s->extra_bits = 0; } // Set default compression level if (avctx->compression_level == FF_COMPRESSION_DEFAULT) s->compression_level = 2; else s->compression_level = av_clip(avctx->compression_level, 0, 2); // Initialize default Rice parameters s->rc.history_mult = 40; s->rc.initial_history = 10; s->rc.k_modifier = 14; s->rc.rice_modifier = 4; s->max_coded_frame_size = get_max_frame_size(avctx->frame_size, avctx->ch_layout.nb_channels, avctx->bits_per_raw_sample); avctx->extradata = av_mallocz(ALAC_EXTRADATA_SIZE + AV_INPUT_BUFFER_PADDING_SIZE); if (!avctx->extradata) return AVERROR(ENOMEM); avctx->extradata_size = ALAC_EXTRADATA_SIZE; alac_extradata = avctx->extradata; AV_WB32(alac_extradata, ALAC_EXTRADATA_SIZE); AV_WB32(alac_extradata+4, MKBETAG('a','l','a','c')); AV_WB32(alac_extradata+12, avctx->frame_size); AV_WB8 (alac_extradata+17, avctx->bits_per_raw_sample); AV_WB8 (alac_extradata+21, avctx->ch_layout.nb_channels); AV_WB32(alac_extradata+24, s->max_coded_frame_size); AV_WB32(alac_extradata+28, avctx->sample_rate * avctx->ch_layout.nb_channels * avctx->bits_per_raw_sample); // average bitrate AV_WB32(alac_extradata+32, avctx->sample_rate); // Set relevant extradata fields if (s->compression_level > 0) { AV_WB8(alac_extradata+18, s->rc.history_mult); AV_WB8(alac_extradata+19, s->rc.initial_history); AV_WB8(alac_extradata+20, s->rc.k_modifier); } if (s->max_prediction_order < s->min_prediction_order) { av_log(avctx, AV_LOG_ERROR, "invalid prediction orders: min=%d max=%d\n", s->min_prediction_order, s->max_prediction_order); return AVERROR(EINVAL); } s->avctx = avctx; if ((ret = ff_lpc_init(&s->lpc_ctx, avctx->frame_size, s->max_prediction_order, FF_LPC_TYPE_LEVINSON)) < 0) { return ret; } return 0; } static int alac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { AlacEncodeContext *s = avctx->priv_data; int out_bytes, max_frame_size, ret; s->frame_size = frame->nb_samples; if (frame->nb_samples < DEFAULT_FRAME_SIZE) max_frame_size = get_max_frame_size(s->frame_size, avctx->ch_layout.nb_channels, avctx->bits_per_raw_sample); else max_frame_size = s->max_coded_frame_size; if ((ret = ff_alloc_packet(avctx, avpkt, 4 * max_frame_size)) < 0) return ret; /* use verbatim mode for compression_level 0 */ if (s->compression_level) { s->verbatim = 0; s->extra_bits = avctx->bits_per_raw_sample - 16; } else { s->verbatim = 1; s->extra_bits = 0; } out_bytes = write_frame(s, avpkt, frame->extended_data); if (out_bytes > max_frame_size) { /* frame too large. use verbatim mode */ s->verbatim = 1; s->extra_bits = 0; out_bytes = write_frame(s, avpkt, frame->extended_data); } avpkt->size = out_bytes; *got_packet_ptr = 1; return 0; } #if FF_API_OLD_CHANNEL_LAYOUT static const uint64_t alac_channel_layouts[ALAC_MAX_CHANNELS + 1] = { AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_SURROUND, AV_CH_LAYOUT_4POINT0, AV_CH_LAYOUT_5POINT0_BACK, AV_CH_LAYOUT_5POINT1_BACK, AV_CH_LAYOUT_6POINT1_BACK, AV_CH_LAYOUT_7POINT1_WIDE_BACK, 0 }; #endif #define OFFSET(x) offsetof(AlacEncodeContext, x) #define AE AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { { "min_prediction_order", NULL, OFFSET(min_prediction_order), AV_OPT_TYPE_INT, { .i64 = DEFAULT_MIN_PRED_ORDER }, MIN_LPC_ORDER, ALAC_MAX_LPC_ORDER, AE }, { "max_prediction_order", NULL, OFFSET(max_prediction_order), AV_OPT_TYPE_INT, { .i64 = DEFAULT_MAX_PRED_ORDER }, MIN_LPC_ORDER, ALAC_MAX_LPC_ORDER, AE }, { NULL }, }; static const AVClass alacenc_class = { .class_name = "alacenc", .item_name = av_default_item_name, .option = options, .version = LIBAVUTIL_VERSION_INT, }; const FFCodec ff_alac_encoder = { .p.name = "alac", CODEC_LONG_NAME("ALAC (Apple Lossless Audio Codec)"), .p.type = AVMEDIA_TYPE_AUDIO, .p.id = AV_CODEC_ID_ALAC, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE, .priv_data_size = sizeof(AlacEncodeContext), .p.priv_class = &alacenc_class, .init = alac_encode_init, FF_CODEC_ENCODE_CB(alac_encode_frame), .close = alac_encode_close, CODEC_OLD_CHANNEL_LAYOUTS_ARRAY(alac_channel_layouts) .p.ch_layouts = ff_alac_ch_layouts, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_NONE }, };
94f0feb3a50c4962ec4a9916ebdbd377eeadf721
44188231036582befe31c4cf3fd46ffa83db4f4c
/libcurv/viewer/shapes.h
2bf5001e0ef8f4804dff84e5e6806b6499d6ff30
[ "Apache-2.0" ]
permissive
curv3d/curv
b083f680af14d75c3a4c767f69105c97e011afe5
567f8ff28f1fc97cc78a11d41ef386372991b1b0
refs/heads/master
2023-08-20T19:38:09.447490
2023-07-11T02:36:47
2023-07-11T02:36:47
91,376,236
1,038
66
Apache-2.0
2023-02-01T02:18:09
2017-05-15T19:22:34
C++
UTF-8
C
false
false
131
h
shapes.h
#pragma once #include "glm/glm.hpp" #include "mesh.h" #include "rectangle.h" Mesh rect (float _x, float _y, float _w, float _h);
8c08fe234b7607b29dc7f314bd07287ab378587a
e3cdfae1dd874479c928dad193b33a4e3b8a623e
/include/worldmap.h
ef223547d60d02c29a945a850778007d13c9f402
[]
no_license
FireEmblemUniverse/fireemblem8u
11493bf94844617b33254110ba006316defb3510
b9ad9bcafd9d4ecb7fc13cc77a464e2a82ac8338
refs/heads/master
2023-09-05T23:39:53.791339
2023-09-04T17:31:47
2023-09-04T17:31:47
121,802,075
118
31
null
2023-09-11T13:08:37
2018-02-16T21:21:50
Assembly
UTF-8
C
false
false
5,336
h
worldmap.h
#ifndef GUARD_WORLDMAP_H #define GUARD_WORLDMAP_H struct GmRouteProc { /* 00 */ PROC_HEADER; /* 2C */ u32 chr; /* 30 */ u8 pal; /* 31 */ u8 flags; /* 32 */ u8 unk_32; /* 33 */ u8 unk_33; /* 34 */ u8 bgA; /* 35 */ u8 bgB; /* 36 */ s8 x1; /* 37 */ s8 y1; /* 38 */ s8 x2; /* 39 */ s8 y2; /* 3A */ u8 bgPriority; /* 3C */ s16 unk_3c; /* 3E */ s16 unk_3e; /* 40 */ struct OpenPaths * pOpenPaths; }; struct Unknown_3001DA8 { /* 00 */ s8 unk_00; /* 01 */ s8 unk_01; /* 02 */ s8 unk_02; /* 03 */ s8 unk_03; /* 04 */ s8 unk_04; /* 05 */ s8 unk_05; }; struct GMapScreenVSyncProc { /* 00 */ PROC_HEADER; /* 2C */ u8 * unk_2c; /* 30 */ u16 * unk_30; /* 34 */ u8 * unk_34; /* 38 */ s16 unk_38; /* 3C */ struct Unknown_3001DA8 * unk_3c; /* 40 */ u16 unk_40; /* 44 */ void * unk_44; }; struct GmScreenProc { /* 00 */ PROC_HEADER; /* 29 */ u8 unk_29_0 : 1; /* 2A */ u8 unk_2a; /* 2B */ s8 unk_2b; /* 2C */ s8 unk_2c; /* 2D */ s8 unk_2d; /* 2E */ s8 unk_2e; /* 2F */ u8 unk_2f; /* 30 */ u8 unk_30; /* 31 */ u8 unk_31; /* 32 */ u8 unk_32; /* 33 */ u8 unk_33; /* 34 */ s16 unk_34; /* 36 */ s16 unk_36; /* 38 */ u16 unk_38; /* 3A */ u16 unk_3a; /* 3C */ u8 * unk_3c; /* 40 */ u16 * unk_40; /* 44 */ u8 * unk_44; /* 48 */ struct GMapScreenVSyncProc * unk_48; /* 4C */ struct GmRouteProc * unk_4c; }; struct GmNodeIconDisplayProc { /* 00 */ PROC_HEADER; /* 2C */ u32 chr; /* 30 */ u8 pal; /* 31 */ u8 unk_31; /* 32 */ u8 unk_32_0 : 1; /* 32 */ u8 unk_32_1 : 1; /* 33 */ u8 nodeId; /* 34 */ u32 unk_34[1]; /* 38 */ struct APHandle * ap; /* 3C */ struct GmScreenProc * pScreenProc; }; enum { GMAPUNIT_FLAG_DISPLAY = (1 << 0), GMAPUNIT_FLAG_BLEND = (1 << 1), GMAPUNIT_FLAG_UPDATEGFX = (1 << 2), }; struct GMapUnitProc { /* 00 */ PROC_HEADER; /* 2A */ u16 flags; /* 2C */ u16 unk_2c; // AP obj priority node /* 2E */ u16 unk_2e; /* 30 */ int unk_30; // base tile index for SMS gfx? /* 34 */ s8 index; // within container proc /* 35 */ u8 faction; /* 36 */ u8 pal; /* 37 */ s8 animId; /* 38 */ u16 unk_38; // class initially /* 3A */ u16 unk_3a; // class initially /* 3C */ u16 x; /* 3E */ u16 y; /* 40 */ struct APHandle * ap; }; struct GMapUnitContainerProc { /* 00 */ PROC_HEADER; /* 2C */ int unk_2c; /* 30 */ u8 unk_30; /* 34 */ struct GMapUnitProc * pMapUnitProcs[7]; }; struct WorldMapMainProc { /* 00 */ PROC_HEADER; /* 29 */ u8 unk_29_0 : 1; /* 29 */ u8 unk_29_1 : 1; /* 29 */ u8 unk_29_2 : 1; /* 29 */ u8 unk_29_3 : 1; /* 29 */ u8 unk_29_4 : 1; /* 29 */ u8 unk_29_5 : 1; /* 29 */ u8 unk_29_6 : 1; /* 29 */ u8 unk_29_7 : 1; /* 2A */ u8 unk_2a; /* 2C */ int unk_2c; /* 30 */ STRUCT_PAD(0x30, 0x3a); /* 3A */ u16 unk_3a; /* 3C */ u16 unk_3c; // pad? /* 3E */ u8 unk_3e; /* 3F */ u8 unk_3f; /* 40 */ s8 unk_40; /* 41 */ s8 unk_41; /* 44 */ struct GmScreenProc * unk_44; // GmapScreen /* 48 */ struct GmNodeIconDisplayProc * unk_48; // GmNodeIconDisplay /* 4C */ struct GMapUnitContainerProc * unk_4c; // Gmap Unit Container /* 50 */ ProcPtr unk_50; // Gmap Cursor /* 54 */ ProcPtr unk_54; // Gmap MU }; struct GMapMovementPathData { /* 00 */ int elapsedTime; /* 04 */ s16 x; /* 06 */ s16 y; }; struct GMapPathData { /* 00 */ u8 * gfxData; /* 04 */ u8 start; /* 05 */ u8 end; /* 08 */ const struct GMapMovementPathData * movementPath; }; extern const struct GMapPathData gWMPathData[]; enum { GMAP_NODE_PLACEMENT_PROGRESSION = 0, GMAP_NODE_PLACEMENT_FRELIA = 1, GMAP_NODE_PLACEMENT_MONSTERSPAWN = 2, GMAP_NODE_PLACEMENT_DUNGEON = 3, }; enum { GMAP_ENCOUNTERS_NONE = 1, GMAP_ENCOUNTERS_MONSTERS = 2, GMAP_ENCOUNTERS_DUNGEON = 3, }; struct GMapNodeData { /* 00 */ u8 placementFlag; /* 01 */ s8 encounters; /* 02 */ u8 iconPreClear; /* 03 */ u8 iconPostClear; /* 04 */ u8 unk_04; // chapter ID start /* 05 */ u8 unk_05; // chapter ID end /* 06 */ s16 unk_06; // event condition flag /* 08 */ s8 unk_08[4]; // next destination id /* 0C */ u16 * armory; /* 10 */ u16 * vendor; /* 14 */ u16 * secretShop; /* 18 */ s16 x; /* 1A */ s16 y; /* 1C */ u16 nameTextId; /* 1E */ u8 shipTravelFlag; /* 1F */ STRUCT_PAD(0x1F, 0x20); }; extern const struct GMapNodeData gWMNodeData[]; struct NodeIcon { /* 00 */ u16 sheetTileId; /* 02 */ STRUCT_PAD(0x2, 0x4); /* 04 */ u16 * pSpriteData; /* 08 */ s8 xCenter; /* 09 */ s8 yCenter; /* 0A */ s8 width; /* 0B */ s8 height; /* 0C */ s8 xFlagOrigin; /* 0D */ s8 yFlagOrigin; /* 0E */ STRUCT_PAD(0xe, 0xf); }; extern const struct NodeIcon gWMNodeIconData[]; extern struct ProcCmd gProcScr_WorldMapMain[]; s8 sub_80B92D0(struct WorldMapMainProc *, int); void MapRoute_80BC2DC(struct GmRouteProc * proc); ProcPtr StartGMapRoute(ProcPtr parent, struct OpenPaths * pPaths, int c, int d); void MapUnitC_SetGfxNeedsUpdate(struct GMapUnitContainerProc * container, int index); #endif // GUARD_WORLDMAP_H
221252759d62b27c8ab31747a88b85175af57247
9ceacf33fd96913cac7ef15492c126d96cae6911
/sys/kern/kern_acct.c
590bed704268162741b80d65d18d337185e9d2bf
[ "BSD-3-Clause" ]
permissive
openbsd/src
ab97ef834fd2d5a7f6729814665e9782b586c130
9e79f3a0ebd11a25b4bff61e900cb6de9e7795e9
refs/heads/master
2023-09-02T18:54:56.624627
2023-09-02T15:16:12
2023-09-02T15:16:12
66,966,208
3,394
1,235
null
2023-08-08T02:42:25
2016-08-30T18:18:25
C
UTF-8
C
false
false
10,124
c
kern_acct.c
/* $OpenBSD: kern_acct.c,v 1.47 2022/08/14 01:58:27 jsg Exp $ */ /* $NetBSD: kern_acct.c,v 1.42 1996/02/04 02:15:12 christos Exp $ */ /*- * Copyright (c) 1994 Christopher G. Demetriou * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)kern_acct.c 8.1 (Berkeley) 6/14/93 */ #include <sys/param.h> #include <sys/systm.h> #include <sys/proc.h> #include <sys/mount.h> #include <sys/vnode.h> #include <sys/fcntl.h> #include <sys/syslog.h> #include <sys/kernel.h> #include <sys/namei.h> #include <sys/errno.h> #include <sys/acct.h> #include <sys/resourcevar.h> #include <sys/tty.h> #include <sys/kthread.h> #include <sys/rwlock.h> #include <sys/syscallargs.h> /* * The routines implemented in this file are described in: * Leffler, et al.: The Design and Implementation of the 4.3BSD * UNIX Operating System (Addison Welley, 1989) * on pages 62-63. * * Arguably, to simplify accounting operations, this mechanism should * be replaced by one in which an accounting log file (similar to /dev/klog) * is read by a user process, etc. However, that has its own problems. */ /* * Internal accounting functions. */ comp_t encode_comp_t(u_long, u_long); int acct_start(void); void acct_thread(void *); void acct_shutdown(void); /* * Accounting vnode pointer, and saved vnode pointer. */ struct vnode *acctp; struct vnode *savacctp; /* * Lock protecting acctp and savacctp. */ struct rwlock acct_lock = RWLOCK_INITIALIZER("acctlk"); /* * Values associated with enabling and disabling accounting */ int acctsuspend = 2; /* stop accounting when < 2% free space left */ int acctresume = 4; /* resume when free space risen to > 4% */ int acctrate = 15; /* delay (in seconds) between space checks */ struct proc *acct_proc; /* * Accounting system call. Written based on the specification and * previous implementation done by Mark Tinguely. */ int sys_acct(struct proc *p, void *v, register_t *retval) { struct sys_acct_args /* { syscallarg(const char *) path; } */ *uap = v; struct nameidata nd; int error; /* Make sure that the caller is root. */ if ((error = suser(p)) != 0) return (error); /* * If accounting is to be started to a file, open that file for * writing and make sure it's 'normal'. */ if (SCARG(uap, path) != NULL) { NDINIT(&nd, 0, 0, UIO_USERSPACE, SCARG(uap, path), p); if ((error = vn_open(&nd, FWRITE|O_APPEND, 0)) != 0) return (error); VOP_UNLOCK(nd.ni_vp); if (nd.ni_vp->v_type != VREG) { vn_close(nd.ni_vp, FWRITE, p->p_ucred, p); return (EACCES); } } rw_enter_write(&acct_lock); /* * If accounting was previously enabled, kill the old space-watcher, * close the file, and (if no new file was specified, leave). */ if (acctp != NULL || savacctp != NULL) { wakeup(&acct_proc); (void)vn_close((acctp != NULL ? acctp : savacctp), FWRITE, p->p_ucred, p); acctp = savacctp = NULL; } if (SCARG(uap, path) == NULL) goto out; /* * Save the new accounting file vnode, and schedule the new * free space watcher. */ acctp = nd.ni_vp; if ((error = acct_start()) != 0) { acctp = NULL; (void)vn_close(nd.ni_vp, FWRITE, p->p_ucred, p); } out: rw_exit_write(&acct_lock); return (error); } /* * Write out process accounting information, on process exit. * Data to be written out is specified in Leffler, et al. * and are enumerated below. (They're also noted in the system * "acct.h" header file.) */ int acct_process(struct proc *p) { struct acct acct; struct process *pr = p->p_p; struct rusage *r; struct timespec booted, elapsed, realstart, st, tmp, uptime, ut; int t; struct vnode *vp; int error = 0; /* If accounting isn't enabled, don't bother */ if (acctp == NULL) return (0); rw_enter_read(&acct_lock); /* * Check the vnode again in case accounting got disabled while waiting * for the lock. */ vp = acctp; if (vp == NULL) goto out; /* * Get process accounting information. */ /* (1) The name of the command that ran */ memcpy(acct.ac_comm, pr->ps_comm, sizeof acct.ac_comm); /* (2) The amount of user and system time that was used */ calctsru(&pr->ps_tu, &ut, &st, NULL); acct.ac_utime = encode_comp_t(ut.tv_sec, ut.tv_nsec); acct.ac_stime = encode_comp_t(st.tv_sec, st.tv_nsec); /* (3) The elapsed time the command ran (and its starting time) */ nanouptime(&uptime); nanoboottime(&booted); timespecadd(&booted, &pr->ps_start, &realstart); acct.ac_btime = realstart.tv_sec; timespecsub(&uptime, &pr->ps_start, &elapsed); acct.ac_etime = encode_comp_t(elapsed.tv_sec, elapsed.tv_nsec); /* (4) The average amount of memory used */ r = &p->p_ru; timespecadd(&ut, &st, &tmp); t = tmp.tv_sec * hz + tmp.tv_nsec / (1000 * tick); if (t) acct.ac_mem = (r->ru_ixrss + r->ru_idrss + r->ru_isrss) / t; else acct.ac_mem = 0; /* (5) The number of disk I/O operations done */ acct.ac_io = encode_comp_t(r->ru_inblock + r->ru_oublock, 0); /* (6) The UID and GID of the process */ acct.ac_uid = pr->ps_ucred->cr_ruid; acct.ac_gid = pr->ps_ucred->cr_rgid; /* (7) The terminal from which the process was started */ if ((pr->ps_flags & PS_CONTROLT) && pr->ps_pgrp->pg_session->s_ttyp) acct.ac_tty = pr->ps_pgrp->pg_session->s_ttyp->t_dev; else acct.ac_tty = -1; /* (8) The boolean flags that tell how process terminated or misbehaved. */ acct.ac_flag = pr->ps_acflag; /* Extensions */ acct.ac_pid = pr->ps_pid; /* * Now, just write the accounting information to the file. */ error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&acct, sizeof (acct), (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT|IO_NOLIMIT, p->p_ucred, NULL, p); out: rw_exit_read(&acct_lock); return (error); } /* * Encode_comp_t converts from ticks in seconds and microseconds * to ticks in 1/AHZ seconds. The encoding is described in * Leffler, et al., on page 63. */ #define MANTSIZE 13 /* 13 bit mantissa. */ #define EXPSIZE 3 /* Base 8 (3 bit) exponent. */ #define MAXFRACT ((1 << MANTSIZE) - 1) /* Maximum fractional value. */ comp_t encode_comp_t(u_long s, u_long ns) { int exp, rnd; exp = 0; rnd = 0; s *= AHZ; s += ns / (1000000000 / AHZ); /* Maximize precision. */ while (s > MAXFRACT) { rnd = s & (1 << (EXPSIZE - 1)); /* Round up? */ s >>= EXPSIZE; /* Base 8 exponent == 3 bit shift. */ exp++; } /* If we need to round up, do it (and handle overflow correctly). */ if (rnd && (++s > MAXFRACT)) { s >>= EXPSIZE; exp++; } /* Clean it up and polish it off. */ exp <<= MANTSIZE; /* Shift the exponent into place */ exp += s; /* and add on the mantissa. */ return (exp); } int acct_start(void) { /* Already running. */ if (acct_proc != NULL) return (0); return (kthread_create(acct_thread, NULL, &acct_proc, "acct")); } /* * Periodically check the file system to see if accounting * should be turned on or off. Beware the case where the vnode * has been vgone()'d out from underneath us, e.g. when the file * system containing the accounting file has been forcibly unmounted. */ void acct_thread(void *arg) { struct statfs sb; struct proc *p = curproc; rw_enter_write(&acct_lock); for (;;) { if (savacctp != NULL) { if (savacctp->v_type == VBAD) { (void) vn_close(savacctp, FWRITE, NOCRED, p); savacctp = NULL; break; } (void)VFS_STATFS(savacctp->v_mount, &sb, NULL); if (sb.f_bavail > acctresume * sb.f_blocks / 100) { acctp = savacctp; savacctp = NULL; log(LOG_NOTICE, "Accounting resumed\n"); } } else if (acctp != NULL) { if (acctp->v_type == VBAD) { (void) vn_close(acctp, FWRITE, NOCRED, p); acctp = NULL; break; } (void)VFS_STATFS(acctp->v_mount, &sb, NULL); if (sb.f_bavail <= acctsuspend * sb.f_blocks / 100) { savacctp = acctp; acctp = NULL; log(LOG_NOTICE, "Accounting suspended\n"); } } else { break; } rwsleep_nsec(&acct_proc, &acct_lock, PPAUSE, "acct", SEC_TO_NSEC(acctrate)); } acct_proc = NULL; rw_exit_write(&acct_lock); kthread_exit(0); } void acct_shutdown(void) { struct proc *p = curproc; rw_enter_write(&acct_lock); if (acctp != NULL || savacctp != NULL) { vn_close((acctp != NULL ? acctp : savacctp), FWRITE, NOCRED, p); acctp = savacctp = NULL; } rw_exit_write(&acct_lock); }
5e73dcd70e6938a35f253c7cd78f04841598b0a1
aa3befea459382dc5c01c925653d54f435b3fb0f
/drivers/power/supply/powerled.c
92278bcc2cf6bdb3ea4fc5b4c7357ecac78cbc50
[ "MIT-open-group", "BSD-3-Clause", "HPND-sell-variant", "BSD-4-Clause-UC", "LicenseRef-scancode-warranty-disclaimer", "MIT-0", "LicenseRef-scancode-bsd-atmel", "LicenseRef-scancode-gary-s-brown", "LicenseRef-scancode-proprietary-license", "SunPro", "MIT", "LicenseRef-scancode-public-domain-disclaimer", "LicenseRef-scancode-other-permissive", "HPND", "ISC", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "GPL-1.0-or-later", "CC-BY-2.0", "CC-BY-4.0" ]
permissive
apache/nuttx
14519a7bff4a87935d94fb8fb2b19edb501c7cec
606b6d9310fb25c7d92c6f95bf61737e3c79fa0f
refs/heads/master
2023-08-25T06:55:45.822534
2023-08-23T16:03:31
2023-08-24T21:25:47
228,103,273
407
241
Apache-2.0
2023-09-14T18:26:05
2019-12-14T23:27:55
C
UTF-8
C
false
false
12,084
c
powerled.c
/**************************************************************************** * drivers/power/supply/powerled.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The * ASF licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. * ****************************************************************************/ /* Upper-half, character driver for high power LED driver. */ /**************************************************************************** * Included Files ****************************************************************************/ #include <nuttx/config.h> #include <sys/types.h> #include <stdint.h> #include <unistd.h> #include <fcntl.h> #include <assert.h> #include <errno.h> #include <debug.h> #include <nuttx/arch.h> #include <nuttx/fs/fs.h> #include <nuttx/power/powerled.h> #include <nuttx/irq.h> /**************************************************************************** * Private Function Prototypes ****************************************************************************/ static int powerled_open(FAR struct file *filep); static int powerled_close(FAR struct file *filep); static int powerled_ioctl(FAR struct file *filep, int cmd, unsigned long arg); /**************************************************************************** * Private Data ****************************************************************************/ static const struct file_operations g_powerled_fops = { powerled_open, /* open */ powerled_close, /* close */ NULL, /* read */ NULL, /* write */ NULL, /* seek */ powerled_ioctl, /* ioctl */ }; /**************************************************************************** * Private Functions ****************************************************************************/ /**************************************************************************** * Name: powerled_open * * Description: * This function is called whenever the POWERLED device is opened. * ****************************************************************************/ static int powerled_open(FAR struct file *filep) { FAR struct inode *inode = filep->f_inode; FAR struct powerled_dev_s *dev = inode->i_private; uint8_t tmp; int ret; /* If the port is the middle of closing, wait until the close is finished */ ret = nxmutex_lock(&dev->closelock); if (ret >= 0) { /* Increment the count of references to the device. If this the first * time that the driver has been opened for this device, then * initialize the device. */ tmp = dev->ocount + 1; if (tmp == 0) { /* More than 255 opens; uint8_t overflows to zero */ ret = -EMFILE; } else { /* Check if this is the first time that the driver has been * opened. */ if (tmp == 1) { /* Yes.. perform one time hardware initialization. */ irqstate_t flags = enter_critical_section(); ret = dev->ops->setup(dev); if (ret == OK) { /* Save the new open count on success */ dev->ocount = tmp; } leave_critical_section(flags); } } nxmutex_unlock(&dev->closelock); } return OK; } /**************************************************************************** * Name: powerled_close * * Description: * This routine is called when the POWERLED device is closed. * It waits for the last remaining data to be sent. * ****************************************************************************/ static int powerled_close(FAR struct file *filep) { FAR struct inode *inode = filep->f_inode; FAR struct powerled_dev_s *dev = inode->i_private; irqstate_t flags; int ret; ret = nxmutex_lock(&dev->closelock); if (ret >= 0) { /* Decrement the references to the driver. If the reference count will * decrement to 0, then uninitialize the driver. */ if (dev->ocount > 1) { dev->ocount--; nxmutex_unlock(&dev->closelock); } else { /* There are no more references to the port */ dev->ocount = 0; /* Free the IRQ and disable the POWERLED device */ flags = enter_critical_section(); /* Disable interrupts */ dev->ops->shutdown(dev); /* Disable the POWERLED */ leave_critical_section(flags); nxmutex_unlock(&dev->closelock); } } return ret; } /**************************************************************************** * Name: powerled_ioctl ****************************************************************************/ static int powerled_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct inode *inode = filep->f_inode; FAR struct powerled_dev_s *dev = inode->i_private; FAR struct powerled_s *powerled = (FAR struct powerled_s *)dev->priv; int ret; switch (cmd) { case PWRIOC_START: { /* Allow powerled start only when limits set and structure is * locked */ if (powerled->limits.lock == false || powerled->limits.current <= 0) { pwrerr("ERROR: powerled limits must be set" " and locked before start\n"); ret = -EPERM; goto errout; } /* Check powerled mode */ if (powerled->opmode != POWERLED_OPMODE_CONTINUOUS && powerled->opmode != POWERLED_OPMODE_FLASH) { pwrerr("ERROR: unsupported powerled mode!"); ret = -EPERM; goto errout; } /* Finally, call start from lower-half driver */ ret = dev->ops->start(dev); if (ret != OK) { pwrerr("ERROR: PWRIOC_START failed %d\n", ret); } break; } case PWRIOC_STOP: { ret = dev->ops->stop(dev); if (ret != OK) { pwrerr("ERROR: PWRIOC_STOP failed %d\n", ret); } break; } case PWRIOC_SET_MODE: { uint8_t mode = ((uint8_t)arg); ret = dev->ops->mode_set(dev, mode); if (ret != OK) { pwrerr("ERROR: PWRIOC_SET_MODE failed %d\n", ret); } break; } case PWRIOC_SET_LIMITS: { FAR struct powerled_limits_s *limits = (FAR struct powerled_limits_s *)((uintptr_t)arg); if (powerled->limits.lock == true) { pwrerr("ERROR: PWRRLED limits locked!\n"); ret = -EPERM; goto errout; } /* NOTE: this call must set the powerled_limits_s structure */ ret = dev->ops->limits_set(dev, limits); if (ret != OK) { pwrerr("ERROR: PWRIOC_SET_LIMITS failed %d\n", ret); } break; } case PWRIOC_GET_STATE: { FAR struct powerled_state_s *state = (FAR struct powerled_state_s *)((uintptr_t)arg); ret = dev->ops->state_get(dev, state); if (ret != OK) { pwrerr("ERROR: PWRIOC_GET_STATE failed %d\n", ret); } break; } case PWRIOC_SET_FAULT: { uint8_t fault = ((uint8_t)arg); ret = dev->ops->fault_set(dev, fault); if (ret != OK) { pwrerr("ERROR: PWRIOC_SET_FAULT failed %d\n", ret); } break; } case PWRIOC_GET_FAULT: { FAR uint8_t *fault = ((FAR uint8_t *)arg); ret = dev->ops->fault_get(dev, fault); if (ret != OK) { pwrerr("ERROR: PWRIOC_GET_FAULT failed %d\n", ret); } break; } case PWRIOC_CLEAN_FAULT: { uint8_t fault = ((uint8_t)arg); ret = dev->ops->fault_clean(dev, fault); if (ret != OK) { pwrerr("ERROR: PWRIOC_CLEAN_FAULT failed %d\n", ret); } break; } case PWRIOC_SET_PARAMS: { FAR struct powerled_params_s *params = (FAR struct powerled_params_s *)((uintptr_t)arg); if (powerled->param.lock == true) { pwrerr("ERROR: powerled params locked!\n"); ret = -EPERM; goto errout; } if (params->brightness < 0.0 || params->brightness > 100.0 || params->frequency < 0.0 || params->duty < 0.0 || params->duty > 100.0) { pwrerr("ERROR: powerled invalid parameters %f %f %f\n", params->brightness, params->frequency, params->duty); ret = -EPERM; goto errout; } ret = dev->ops->params_set(dev, params); if (ret != OK) { pwrerr("ERROR: PWRIOC_SET_PARAMS failed %d\n", ret); } break; } default: { pwrinfo("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); ret = dev->ops->ioctl(dev, cmd, arg); break; } } errout: return ret; } /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** * Name: powerled_register ****************************************************************************/ int powerled_register(FAR const char *path, FAR struct powerled_dev_s *dev, FAR void *lower) { int ret; DEBUGASSERT(path != NULL && dev != NULL && lower != NULL); DEBUGASSERT(dev->ops != NULL); /* For safety reason, when some necessary low-level logic is not provided, * system should fail before low-level hardware initialization, so: * - all ops are checked here, before character driver registration * - all ops must be provided, even if not used */ DEBUGASSERT(dev->ops->setup != NULL); DEBUGASSERT(dev->ops->shutdown != NULL); DEBUGASSERT(dev->ops->stop != NULL); DEBUGASSERT(dev->ops->start != NULL); DEBUGASSERT(dev->ops->params_set != NULL); DEBUGASSERT(dev->ops->mode_set != NULL); DEBUGASSERT(dev->ops->limits_set != NULL); DEBUGASSERT(dev->ops->fault_set != NULL); DEBUGASSERT(dev->ops->state_get != NULL); DEBUGASSERT(dev->ops->fault_get != NULL); DEBUGASSERT(dev->ops->fault_clean != NULL); DEBUGASSERT(dev->ops->ioctl != NULL); /* Initialize the powerled device structure */ dev->ocount = 0; /* Initialize mutex */ nxmutex_init(&dev->closelock); /* Connect POWERLED driver with lower level interface */ dev->lower = lower; /* Register the POWERLED character driver */ ret = register_driver(path, &g_powerled_fops, 0666, dev); if (ret < 0) { nxmutex_destroy(&dev->closelock); } return ret; }
e7fce0f65023a17f0548ccc38835db6c5405e891
e683a0b8dbb87c7ceb99e0d06896174a559d2c67
/Tools/pmake/lib/lst/lstPred.c
4c180dd94d5ce1935470720fc2f5a11ac6f03113
[ "Apache-2.0" ]
permissive
bluewaysw/pcgeos
f093d79567d977d992f47065056d14d5a04b9f14
c6ae4c8e77b54b9ff654c3916f2191f8b1a1b65d
refs/heads/master
2023-08-31T00:17:54.481175
2023-08-29T19:00:49
2023-08-29T19:00:49
157,968,410
603
88
Apache-2.0
2023-09-13T07:44:06
2018-11-17T09:09:55
Assembly
UTF-8
C
false
false
1,211
c
lstPred.c
/*- * LstPred.c -- * Return the predecessor of a given list node * * Copyright (c) 1988 by University of California Regents * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without * fee is hereby granted, provided that the above copyright * notice appears in all copies. Neither the University of California nor * Adam de Boor makes any representations about the suitability of this * software for any purpose. It is provided "as is" without * express or implied warranty. */ #ifndef lint static char *rcsid = "$Id: lstPred.c,v 1.2 96/06/24 15:02:32 tbradley Exp $ SPRITE (Berkeley)"; #endif lint #include "lstInt.h" /*- *----------------------------------------------------------------------- * Lst_Pred -- * Return the predecessor of the given node. * * Results: * The node's predecessor, if any, or NILLNODE if it has none. * * Side Effects: * None. * *----------------------------------------------------------------------- */ LstNode Lst_Pred (LstNode ln) { if (ln == NILLNODE) { return (NILLNODE); } else { return ((LstNode)((ListNode) ln)->prevPtr); } }
81298005161c9bd2f65e71d128eb471e085c854c
7eaf54a78c9e2117247cb2ab6d3a0c20719ba700
/SOFTWARE/A64-TERES/linux-a64/include/net/netfilter/nf_queue.h
aaba4bbcdda0e9e7b4b7adfcb4c19e3555bb4219
[ "Linux-syscall-note", "GPL-2.0-only", "GPL-1.0-or-later", "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
OLIMEX/DIY-LAPTOP
ae82f4ee79c641d9aee444db9a75f3f6709afa92
a3fafd1309135650bab27f5eafc0c32bc3ca74ee
refs/heads/rel3
2023-08-04T01:54:19.483792
2023-04-03T07:18:12
2023-04-03T07:18:12
80,094,055
507
92
Apache-2.0
2023-04-03T07:05:59
2017-01-26T07:25:50
C
UTF-8
C
false
false
979
h
nf_queue.h
#ifndef _NF_QUEUE_H #define _NF_QUEUE_H /* Each queued (to userspace) skbuff has one of these. */ struct nf_queue_entry { struct list_head list; struct sk_buff *skb; unsigned int id; struct nf_hook_ops *elem; u_int8_t pf; u16 size; /* sizeof(entry) + saved route keys */ unsigned int hook; struct net_device *indev; struct net_device *outdev; int (*okfn)(struct sk_buff *); /* extra space to store route keys */ }; #define nf_queue_entry_reroute(x) ((void *)x + sizeof(struct nf_queue_entry)) /* Packet queuing */ struct nf_queue_handler { int (*outfn)(struct nf_queue_entry *entry, unsigned int queuenum); }; void nf_register_queue_handler(const struct nf_queue_handler *qh); void nf_unregister_queue_handler(void); extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict); bool nf_queue_entry_get_refs(struct nf_queue_entry *entry); void nf_queue_entry_release_refs(struct nf_queue_entry *entry); #endif /* _NF_QUEUE_H */
207edef757d1d5d5b1fc539ccf2899de4e1da3e1
30c2631ed046d7662476b94fb7f5286c47377f60
/test/api/src/TriggerOnAdd.c
cdbe466fd7fad64700c443c637d58b4c8162d6b2
[ "MIT" ]
permissive
SanderMertens/flecs
a840093340f0d1eb2bd30ec1585296f81f2aab39
41fb856c4e1162f44b59d7881ef508d64d56bf10
refs/heads/master
2023-08-24T16:21:41.790084
2023-08-24T08:38:57
2023-08-24T08:49:52
146,155,284
4,731
456
MIT
2023-09-05T16:01:58
2018-08-26T05:53:05
C
UTF-8
C
false
false
24,234
c
TriggerOnAdd.c
#include <api.h> void TriggerOnAdd_setup(void) { ecs_log_set_level(-3); } void Init(ecs_iter_t *it) { Position *p = ecs_field(it, Position, 1); Velocity *v = NULL; if (it->field_count >= 2) { v = ecs_field(it, Velocity, 2); } probe_iter(it); int i; for (i = 0; i < it->count; i ++) { p[i].x = 10; p[i].y = 20; if (v) { v[i].x = 30; v[i].y = 40; } } } static void Add_to_current(ecs_iter_t *it) { IterData *ctx = ecs_get_ctx(it->world); int i; for (i = 0; i < it->count; i ++) { if (ctx->component) { ecs_add_id(it->world, it->entities[i], ctx->component); test_assert( !!ecs_get_type(it->world, it->entities[i])); } if (ctx->component_2) { ecs_add_id(it->world, it->entities[i], ctx->component_2); } ctx->entity_count ++; } } static void Remove_from_current(ecs_iter_t *it) { IterData *ctx = ecs_get_ctx(it->world); int i; for (i = 0; i < it->count; i ++) { ecs_entity_t e = it->entities[i]; if (ctx->component) { ecs_remove_id(it->world, e, ctx->component); } if (ctx->component_2) { ecs_remove_id(it->world, e, ctx->component_2); } ctx->entity_count ++; } } static void Set_current(ecs_iter_t *it) { IterData *ctx = ecs_get_ctx(it->world); ecs_entity_t ecs_id(Rotation) = ctx->component; int i; for (i = 0; i < it->count; i ++) { ecs_set(it->world, it->entities[i], Rotation, {10 + it->entities[i]}); ctx->entity_count ++; } } static bool dummy_called = false; static void Dummy(ecs_iter_t *it) { dummy_called = true; } void TriggerOnAdd_new_match_1_of_1(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, Init, EcsOnAdd, Position); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e = ecs_new(world, Position); test_assert(e != 0); test_int(ctx.count, 1); test_int(ctx.invoked, 1); test_int(ctx.system, Init); test_int(ctx.term_count, 1); test_null(ctx.param); test_int(ctx.e[0], e); test_int(ctx.c[0][0], ecs_id(Position)); test_int(ctx.s[0][0], 0); const Position *p = ecs_get(world, e, Position); test_int(p->x, 10); test_int(p->y, 20); ecs_fini(world); } void TriggerOnAdd_new_match_1_of_2(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_OBSERVER(world, Init, EcsOnAdd, Position); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ECS_ENTITY(world, e, Position, Velocity); test_assert(e != 0); test_int(ctx.count, 1); test_int(ctx.invoked, 1); test_int(ctx.system, Init); test_int(ctx.term_count, 1); test_null(ctx.param); test_int(ctx.e[0], e); test_int(ctx.c[0][0], ecs_id(Position)); test_int(ctx.s[0][0], 0); const Position *p = ecs_get(world, e, Position); test_int(p->x, 10); test_int(p->y, 20); ecs_fini(world); } void TriggerOnAdd_new_no_match_1(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_OBSERVER(world, Init, EcsOnAdd, Position); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e = ecs_new(world, Velocity); test_assert(e != 0); test_int(ctx.count, 0); ecs_fini(world); } void TriggerOnAdd_add_match_1_of_1(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, Init, EcsOnAdd, Position); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e = ecs_new(world, 0); test_assert(e != 0); test_int(ctx.count, 0); ecs_add(world, e, Position); test_int(ctx.count, 1); test_int(ctx.invoked, 1); test_int(ctx.system, Init); test_int(ctx.term_count, 1); test_null(ctx.param); test_int(ctx.e[0], e); test_int(ctx.c[0][0], ecs_id(Position)); test_int(ctx.s[0][0], 0); const Position *p = ecs_get(world, e, Position); test_int(p->x, 10); test_int(p->y, 20); ecs_fini(world); } void TriggerOnAdd_add_match_1_of_2(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_OBSERVER(world, Init, EcsOnAdd, Position); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e = ecs_new(world, 0); test_assert(e != 0); test_int(ctx.count, 0); ecs_add(world, e, Position); ecs_add(world, e, Velocity); test_int(ctx.count, 1); test_int(ctx.invoked, 1); test_int(ctx.system, Init); test_int(ctx.term_count, 1); test_null(ctx.param); test_int(ctx.e[0], e); test_int(ctx.c[0][0], ecs_id(Position)); test_int(ctx.s[0][0], 0); const Position *p = ecs_get(world, e, Position); test_int(p->x, 10); test_int(p->y, 20); ecs_fini(world); } void TriggerOnAdd_add_no_match_1(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_OBSERVER(world, Init, EcsOnAdd, Velocity); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e = ecs_new(world, 0); test_assert(e != 0); test_int(ctx.count, 0); ecs_add(world, e, Position); test_int(ctx.count, 0); ecs_fini(world); } void TriggerOnAdd_set_match_1_of_1(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, Init, EcsOnAdd, Position); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e = ecs_new(world, 0); test_assert(e != 0); test_int(ctx.count, 0); ecs_set(world, e, Position, {1, 2}); test_int(ctx.count, 1); test_int(ctx.invoked, 1); test_int(ctx.system, Init); test_int(ctx.term_count, 1); test_null(ctx.param); test_int(ctx.e[0], e); test_int(ctx.c[0][0], ecs_id(Position)); test_int(ctx.s[0][0], 0); const Position *p = ecs_get(world, e, Position); test_int(p->x, 1); test_int(p->y, 2); ecs_fini(world); } void TriggerOnAdd_set_no_match_1(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_OBSERVER(world, Init, EcsOnAdd, Velocity); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e = ecs_new(world, 0); test_assert(e != 0); test_int(ctx.count, 0); ecs_set(world, e, Position, {1, 2}); test_int(ctx.count, 0); ecs_fini(world); } void TriggerOnAdd_clone_match_1_of_1(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, Init, EcsOnAdd, Position); ecs_entity_t e1 = ecs_new(world, Position); test_assert(e1 != 0); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e2 = ecs_clone(world, 0, e1, false); test_int(ctx.count, 1); test_int(ctx.invoked, 1); test_int(ctx.system, Init); test_int(ctx.term_count, 1); test_null(ctx.param); test_int(ctx.e[0], e2); test_int(ctx.c[0][0], ecs_id(Position)); test_int(ctx.s[0][0], 0); const Position *p = ecs_get(world, e2, Position); test_int(p->x, 10); test_int(p->y, 20); ecs_fini(world); } void TriggerOnAdd_clone_match_1_of_2(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_OBSERVER(world, Init, EcsOnAdd, Position); ECS_ENTITY(world, e1, Position, Velocity); test_assert(e1 != 0); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e2 = ecs_clone(world, 0, e1, false); test_int(ctx.count, 1); test_int(ctx.invoked, 1); test_int(ctx.system, Init); test_int(ctx.term_count, 1); test_null(ctx.param); test_int(ctx.e[0], e2); test_int(ctx.c[0][0], ecs_id(Position)); test_int(ctx.s[0][0], 0); const Position *p = ecs_get(world, e2, Position); test_int(p->x, 10); test_int(p->y, 20); ecs_fini(world); } void TriggerOnAdd_add_again_1(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, Init, EcsOnAdd, Position); ecs_entity_t e = ecs_new(world, 0); test_assert(e != 0); ecs_add(world, e, Position); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_add(world, e, Position); test_int(ctx.count, 0); ecs_fini(world); } void TriggerOnAdd_set_again_1(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, Init, EcsOnAdd, Position); ecs_entity_t e = ecs_new(world, 0); test_assert(e != 0); ecs_set(world, e, Position, {10, 20}); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_set(world, e, Position, {30, 40}); test_int(ctx.count, 0); ecs_fini(world); } void TriggerOnAdd_add_again_2(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_OBSERVER(world, Init, EcsOnAdd, Position); ecs_entity_t e = ecs_new(world, 0); test_assert(e != 0); ecs_add(world, e, Position); ecs_add(world, e, Velocity); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_add(world, e, Position); ecs_add(world, e, Velocity); test_int(ctx.count, 0); ecs_fini(world); } void TriggerOnAdd_new_w_count_match_1_of_1(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, Init, EcsOnAdd, Position); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); const ecs_entity_t *ids = ecs_bulk_new(world, Position, 3); test_assert(ids != NULL); test_int(ctx.count, 3); test_int(ctx.invoked, 1); test_int(ctx.system, Init); test_int(ctx.term_count, 1); test_null(ctx.param); test_int(ctx.e[0], ids[0]); test_int(ctx.e[1], ids[1]); test_int(ctx.e[2], ids[2]); test_int(ctx.c[0][0], ecs_id(Position)); test_int(ctx.s[0][0], 0); int i; for (i = 0; i < 3; i ++) { const Position *p = ecs_get(world, ids[i], Position); test_int(p->x, 10); test_int(p->y, 20); } ecs_fini(world); } static void AddVelocity(ecs_iter_t *it) { Position *p = ecs_field(it, Position, 1); ecs_id_t v = 0; if (it->ctx) { v = *(ecs_id_t*)it->ctx; } if (!v) { v = ecs_field_id(it, 2); } probe_iter(it); int i; for (i = 0; i < it->count; i ++) { p[i].x = 1; p[i].y = 2; ecs_add_id(it->world, it->entities[i], v); } } void TriggerOnAdd_override_after_add_in_on_add(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_PREFAB(world, Prefab, Position); ecs_set(world, Prefab, Position, {1, 2}); ECS_OBSERVER(world, AddVelocity, EcsOnAdd, Position(self)); ecs_observer_init(world, &(ecs_observer_desc_t){ .entity = ecs_entity(world, {.id = AddVelocity}), .ctx = &ecs_id(Velocity) }); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e = ecs_new_w_pair(world, EcsIsA, Prefab); test_assert(e != 0); test_int(ctx.count, 0); ecs_add(world, e, Position); test_assert( ecs_has(world, e, Position)); test_assert( ecs_has(world, e, Velocity)); test_int(ctx.count, 1); test_int(ctx.invoked, 1); test_int(ctx.system, AddVelocity); test_int(ctx.term_count, 1); test_int(ctx.e[0], e); test_int(ctx.c[0][0], ecs_id(Position)); test_int(ctx.s[0][0], 0); const Position *p = ecs_get(world, e, Position); test_int(p->x, 1); test_int(p->y, 2); ecs_fini(world); } static void OnSetPosition(ecs_iter_t *it) { Position *p = ecs_field(it, Position, 1); int i; for (i = 0; i < it->count; i ++) { p[i].x ++; p[i].y ++; } } void TriggerOnAdd_set_after_add_in_on_add(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_OBSERVER(world, AddVelocity, EcsOnAdd, Position); ECS_OBSERVER(world, OnSetPosition, EcsOnSet, Position); ecs_observer_init(world, &(ecs_observer_desc_t){ .entity = ecs_entity(world, {.id = AddVelocity}), .ctx = &ecs_id(Velocity) }); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e = ecs_new(world, 0); test_assert(e != 0); test_int(ctx.count, 0); ecs_set(world, e, Position, {1, 2}); test_assert( ecs_has(world, e, Position)); test_assert( ecs_has(world, e, Velocity)); test_int(ctx.count, 1); test_int(ctx.invoked, 1); test_int(ctx.system, AddVelocity); test_int(ctx.term_count, 1); test_int(ctx.e[0], e); test_int(ctx.c[0][0], ecs_id(Position)); test_int(ctx.s[0][0], 0); const Position *p = ecs_get(world, e, Position); test_int(p->x, 2); test_int(p->y, 3); ecs_fini(world); } static void AddAgain(ecs_iter_t *it) { ecs_id_t ecs_id(Position) = ecs_field_id(it, 1); int i; for (i = 0; i < it->count; i ++) { ecs_add(it->world, it->entities[i], Position); } } void TriggerOnAdd_add_again_in_progress(void) { ecs_world_t *world = ecs_init(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, Init, EcsOnAdd, Position); ECS_SYSTEM(world, AddAgain, EcsOnUpdate, Position); ecs_entity_t e = ecs_new(world, 0); test_assert(e != 0); ecs_add(world, e, Position); Probe ctx = {0}; ecs_set_ctx(world, &ctx, NULL); ecs_progress(world, 1); test_int(ctx.count, 0); ecs_fini(world); } static void AddMass(ecs_iter_t *it) { Mass *m = ecs_field(it, Mass, 1); int i; for (i = 0; i < it->count; i ++) { m[i] = 10; } } void TriggerOnAdd_add_in_progress_before_system_def(void) { ecs_world_t *world = ecs_init(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_SYSTEM(world, AddVelocity, EcsOnUpdate, Position, Velocity()); ecs_entity_t e = ecs_new(world, Position); test_assert(e != 0); test_assert( ecs_has(world, e, Position)); test_assert( !ecs_has(world, e, Velocity)); ecs_progress(world, 1); test_assert( ecs_has(world, e, Position)); test_assert( ecs_has(world, e, Velocity)); ECS_COMPONENT(world, Mass); ECS_OBSERVER(world, AddMass, EcsOnAdd, Mass); ecs_add(world, e, Mass); test_assert( ecs_has(world, e, Mass)); const Mass *m = ecs_get(world, e, Mass); test_assert(m != NULL); test_int(*m, 10); ecs_fini(world); } void SystemA(ecs_iter_t *it) { int i, tag; for (i = 0; i < it->count; i ++) { for (tag = 1000; tag < 1100; tag ++) { ecs_add_id(it->world, it->entities[i], tag); } } } void SystemB(ecs_iter_t *it) { ecs_id_t ecs_id(Position) = ecs_field_id(it, 1); int i; for (i = 0; i < it->count; i ++) { ecs_has(it->world, it->entities[i], Position); } } void TriggerOnAdd_2_systems_w_table_creation(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, SystemA, EcsOnAdd, Position); ECS_OBSERVER(world, SystemB, EcsOnAdd, Position); ecs_entity_t e = ecs_new(world, Position); test_assert(e != 0); ecs_fini(world); } void NewWithPosition(ecs_iter_t *it) { ecs_id_t ecs_id(Position) = ecs_field_id(it, 1); ecs_entity_t e = ecs_new(it->world, Position); test_assert(e != 0); } void TriggerOnAdd_2_systems_w_table_creation_in_progress(void) { ecs_world_t *world = ecs_init(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, SystemA, EcsOnAdd, Position); ECS_OBSERVER(world, SystemB, EcsOnAdd, Position); ECS_SYSTEM(world, NewWithPosition, EcsOnUpdate, Position()); ecs_progress(world, 1); ecs_fini(world); } static void TestContext(ecs_iter_t *it) { void *world_ctx = ecs_get_ctx(it->world); test_assert(world_ctx == it->ctx); int32_t *param = it->ctx; (*param) ++; } void TriggerOnAdd_sys_context(void) { ecs_world_t *world = ecs_mini(); int32_t param = 0; ECS_COMPONENT(world, Position); ECS_OBSERVER(world, TestContext, EcsOnAdd, Position); ecs_observer_init(world, &(ecs_observer_desc_t){ .entity = ecs_entity(world, {.id = TestContext}), .ctx = &param }); test_assert(ecs_observer_get_ctx(world, TestContext) == &param); ecs_fini(world); } void TriggerOnAdd_get_sys_context_from_param(void) { ecs_world_t *world = ecs_mini(); int32_t param = 0; ECS_COMPONENT(world, Position); ECS_OBSERVER(world, TestContext, EcsOnAdd, Position); ecs_observer_init(world, &(ecs_observer_desc_t){ .entity = ecs_entity(world, {.id = TestContext}), .ctx = &param }); /* Set world context so system can compare if pointer is correct */ ecs_set_ctx(world, &param, NULL); /* Trigger system */ ecs_new(world, Position); test_int(param, 1); ecs_fini(world); } void TriggerOnAdd_remove_added_component_in_on_add_w_set(void) { install_test_abort(); ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_OBSERVER(world, Remove_from_current, EcsOnAdd, Position); IterData ctx = {.component = ecs_id(Position)}; ecs_set_ctx(world, &ctx, NULL); test_expect_abort(); ecs_set(world, 0, Position, {0, 0}); } void Add_3_to_current(ecs_iter_t *it) { IterData *ctx = ecs_get_ctx(it->world); int i; for (i = 0; i < it->count; i ++) { if (ctx->component_3) { ecs_add_id(it->world, it->entities[i], ctx->component_3); } ctx->entity_count ++; } } void TriggerOnAdd_on_add_in_on_add(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_COMPONENT(world, Mass); ECS_OBSERVER(world, Add_to_current, EcsOnAdd, Position); ECS_OBSERVER(world, Add_3_to_current, EcsOnAdd, Velocity); IterData ctx = {.component = ecs_id(Velocity), .component_3 = ecs_id(Mass)}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e1 = ecs_new(world, Position); ecs_entity_t e2 = ecs_new(world, Position); ecs_entity_t e3 = ecs_new(world, Position); test_assert( ecs_has(world, e1, Position)); test_assert( ecs_has(world, e2, Position)); test_assert( ecs_has(world, e3, Position)); test_assert( ecs_has(world, e1, Velocity)); test_assert( ecs_has(world, e2, Velocity)); test_assert( ecs_has(world, e3, Velocity)); test_assert( ecs_has(world, e1, Mass)); test_assert( ecs_has(world, e2, Mass)); test_assert( ecs_has(world, e3, Mass)); ecs_fini(world); } void TriggerOnAdd_on_remove_in_on_add(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_OBSERVER(world, Remove_from_current, EcsOnAdd, Position); ECS_OBSERVER(world, Dummy, EcsOnRemove, Velocity); IterData ctx = {.component = ecs_id(Velocity)}; ecs_set_ctx(world, &ctx, NULL); ECS_ENTITY(world, e1, Position, Velocity); ECS_ENTITY(world, e2, Position, Velocity); ECS_ENTITY(world, e3, Position, Velocity); test_assert( ecs_has(world, e1, Position)); test_assert( ecs_has(world, e2, Position)); test_assert( ecs_has(world, e3, Position)); test_assert( !ecs_has(world, e1, Velocity)); test_assert( !ecs_has(world, e2, Velocity)); test_assert( !ecs_has(world, e3, Velocity)); test_assert(dummy_called); ecs_fini(world); } void TriggerOnAdd_on_set_in_on_add(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Rotation); ECS_COMPONENT(world, Mass); ECS_OBSERVER(world, Set_current, EcsOnAdd, Position); ECS_OBSERVER(world, Add_3_to_current, EcsOnSet, Rotation); IterData ctx = {.component = ecs_id(Rotation), .component_3 = ecs_id(Mass)}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e1 = ecs_new(world, Position); ecs_entity_t e2 = ecs_new(world, Position); ecs_entity_t e3 = ecs_new(world, Position); test_assert( ecs_has(world, e1, Position)); test_assert( ecs_has(world, e2, Position)); test_assert( ecs_has(world, e3, Position)); test_assert( ecs_has(world, e1, Rotation)); test_assert( ecs_has(world, e2, Rotation)); test_assert( ecs_has(world, e3, Rotation)); test_assert( ecs_has(world, e1, Mass)); test_assert( ecs_has(world, e2, Mass)); test_assert( ecs_has(world, e3, Mass)); const Rotation *r = ecs_get(world, e1, Rotation); test_assert(r != NULL); test_int(*r, 10 + e1); r = ecs_get(world, e2, Rotation); test_assert(r != NULL); test_int(*r, 10 + e2); r = ecs_get(world, e3, Rotation); test_assert(r != NULL); test_int(*r, 10 + e3); ecs_fini(world); } void TriggerOnAdd_on_add_in_on_update(void) { ecs_world_t *world = ecs_init(); ECS_COMPONENT(world, Position); ECS_COMPONENT(world, Velocity); ECS_COMPONENT(world, Mass); ECS_SYSTEM(world, Add_to_current, EcsOnUpdate, Position); ECS_OBSERVER(world, Add_3_to_current, EcsOnAdd, Velocity); IterData ctx = {.component = ecs_id(Velocity), .component_3 = ecs_id(Mass)}; ecs_set_ctx(world, &ctx, NULL); ecs_entity_t e1 = ecs_new(world, Position); ecs_entity_t e2 = ecs_new(world, Position); ecs_entity_t e3 = ecs_new(world, Position); ecs_progress(world, 1); test_assert( ecs_has(world, e1, Position)); test_assert( ecs_has(world, e2, Position)); test_assert( ecs_has(world, e3, Position)); test_assert( ecs_has(world, e1, Velocity)); test_assert( ecs_has(world, e2, Velocity)); test_assert( ecs_has(world, e3, Velocity)); test_assert( ecs_has(world, e1, Mass)); test_assert( ecs_has(world, e2, Mass)); test_assert( ecs_has(world, e3, Mass)); ecs_fini(world); } void TriggerOnAdd_emplace(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ecs_observer_init(world, &(ecs_observer_desc_t){ .filter.terms[0].id = ecs_id(Position), .events = {EcsOnAdd}, .callback = Dummy }); ecs_entity_t e = ecs_new_id(world); test_assert(e != 0); test_int(dummy_called, 0); Position *p = ecs_emplace(world, e, Position); test_assert(p != NULL); test_bool(dummy_called, true); ecs_fini(world); } void TriggerOnAdd_add_after_delete_trigger(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ecs_entity_t trigger = ecs_observer_init(world, &(ecs_observer_desc_t){ .filter.terms[0].id = ecs_id(Position), .events = {EcsOnAdd}, .callback = Dummy }); ecs_entity_t e1 = ecs_new(world, Position); test_assert(e1 != 0); test_assert(ecs_has(world, e1, Position)); test_int(dummy_called, 1); dummy_called = 0; ecs_delete(world, trigger); test_int(dummy_called, 0); ecs_entity_t e2 = ecs_new(world, Position); test_assert(e2 != 0); test_assert(ecs_has(world, e2, Position)); test_int(dummy_called, 0); ecs_fini(world); } void TriggerOnAdd_add_after_delete_wildcard_id_trigger(void) { ecs_world_t *world = ecs_mini(); ECS_COMPONENT(world, Position); ecs_entity_t trigger = ecs_observer_init(world, &(ecs_observer_desc_t){ .filter.terms[0].id = EcsWildcard, .events = {EcsOnAdd}, .callback = Dummy }); ecs_entity_t e1 = ecs_new(world, Position); test_assert(e1 != 0); test_assert(ecs_has(world, e1, Position)); test_int(dummy_called, 1); dummy_called = 0; ecs_delete(world, trigger); test_int(dummy_called, 0); ecs_entity_t e2 = ecs_new(world, Position); test_assert(e2 != 0); test_assert(ecs_has(world, e2, Position)); test_int(dummy_called, 0); ecs_fini(world); }
7d57370dba8b70a2368c7a77703f6a323cad42f5
ed98b77f3f09b392e68a0d59c48eec299e883bb9
/src/scip/cons.c
6c446cbc3e9649e653012651258cd0d0bfe94c0a
[ "Apache-2.0" ]
permissive
scipopt/scip
c8ddbe7cdec0a3af5a230c04b74b76ffacbdcc33
dc856a4c966ea50bd5f52c58d7be4fea33706f4c
refs/heads/master
2023-08-19T11:39:12.578790
2023-08-15T20:05:58
2023-08-15T20:05:58
342,522,859
262
46
NOASSERTION
2023-08-03T07:37:45
2021-02-26T09:16:17
C
UTF-8
C
false
false
321,680
c
cons.c
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the program and library */ /* SCIP --- Solving Constraint Integer Programs */ /* */ /* Copyright (c) 2002-2023 Zuse Institute Berlin (ZIB) */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ /* */ /* http://www.apache.org/licenses/LICENSE-2.0 */ /* */ /* Unless required by applicable law or agreed to in writing, software */ /* distributed under the License is distributed on an "AS IS" BASIS, */ /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ /* See the License for the specific language governing permissions and */ /* limitations under the License. */ /* */ /* You should have received a copy of the Apache-2.0 license */ /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /**@file cons.c * @ingroup OTHER_CFILES * @brief methods for constraints and constraint handlers * @author Tobias Achterberg * @author Timo Berthold */ /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ #include <assert.h> #include "scip/def.h" #include "scip/set.h" #include "scip/stat.h" #include "scip/clock.h" #include "scip/var.h" #include "scip/prob.h" #include "scip/tree.h" #include "scip/scip.h" #include "scip/sepastore.h" #include "scip/cons.h" #include "scip/branch.h" #include "scip/reopt.h" #include "scip/pub_misc.h" #ifndef NDEBUG #include "scip/struct_cons.h" #endif #define AGERESETAVG_INIT 1000.0 /**< initial value of the exponentially decaying weighted sum for ages */ #define AGERESETAVG_MIN 100.0 /**< minimal value to use for weighted sum of ages */ #define AGERESETAVG_DECAY 0.0005 /**< weight of a new addend in the exponentially decyaing sum */ #define AGERESETAVG_AGELIMIT 2.0 /**< in dynamic setting, a constraint is deleted if its age exceeds the * average reset age by this factor */ #define AGERESETAVG_OBSOLETEAGE 1.8 /**< in dynamic setting, a constraint is marked obsolete if its age exceeds the * average reset age by this factor */ /* #define CHECKCONSARRAYS */ /* * dynamic memory arrays */ /** resizes conss array to be able to store at least num constraints */ static SCIP_RETCODE conshdlrEnsureConssMem( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ int num /**< minimal number of slots in array */ ) { assert(conshdlr != NULL); assert(set != NULL); if( num > conshdlr->consssize ) { int newsize; newsize = SCIPsetCalcMemGrowSize(set, num); SCIP_ALLOC( BMSreallocMemoryArray(&conshdlr->conss, newsize) ); conshdlr->consssize = newsize; } assert(num <= conshdlr->consssize); return SCIP_OKAY; } /** resizes initconss array to be able to store at least num constraints */ static SCIP_RETCODE conshdlrEnsureInitconssMem( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ int num /**< minimal number of slots in array */ ) { assert(conshdlr != NULL); assert(set != NULL); if( num > conshdlr->initconsssize ) { int newsize; newsize = SCIPsetCalcMemGrowSize(set, num); SCIP_ALLOC( BMSreallocMemoryArray(&conshdlr->initconss, newsize) ); conshdlr->initconsssize = newsize; } assert(num <= conshdlr->initconsssize); return SCIP_OKAY; } /** resizes sepaconss array to be able to store at least num constraints */ static SCIP_RETCODE conshdlrEnsureSepaconssMem( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ int num /**< minimal number of slots in array */ ) { assert(conshdlr != NULL); assert(set != NULL); if( num > conshdlr->sepaconsssize ) { int newsize; newsize = SCIPsetCalcMemGrowSize(set, num); SCIP_ALLOC( BMSreallocMemoryArray(&conshdlr->sepaconss, newsize) ); conshdlr->sepaconsssize = newsize; } assert(num <= conshdlr->sepaconsssize); return SCIP_OKAY; } /** resizes enfoconss array to be able to store at least num constraints */ static SCIP_RETCODE conshdlrEnsureEnfoconssMem( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ int num /**< minimal number of slots in array */ ) { assert(conshdlr != NULL); assert(set != NULL); if( num > conshdlr->enfoconsssize ) { int newsize; newsize = SCIPsetCalcMemGrowSize(set, num); SCIP_ALLOC( BMSreallocMemoryArray(&conshdlr->enfoconss, newsize) ); conshdlr->enfoconsssize = newsize; } assert(num <= conshdlr->enfoconsssize); return SCIP_OKAY; } /** resizes checkconss array to be able to store at least num constraints */ static SCIP_RETCODE conshdlrEnsureCheckconssMem( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ int num /**< minimal number of slots in array */ ) { assert(conshdlr != NULL); assert(set != NULL); if( num > conshdlr->checkconsssize ) { int newsize; newsize = SCIPsetCalcMemGrowSize(set, num); SCIP_ALLOC( BMSreallocMemoryArray(&conshdlr->checkconss, newsize) ); conshdlr->checkconsssize = newsize; } assert(num <= conshdlr->checkconsssize); return SCIP_OKAY; } /** resizes propconss array to be able to store at least num constraints */ static SCIP_RETCODE conshdlrEnsurePropconssMem( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ int num /**< minimal number of slots in array */ ) { assert(conshdlr != NULL); assert(set != NULL); if( num > conshdlr->propconsssize ) { int newsize; newsize = SCIPsetCalcMemGrowSize(set, num); SCIP_ALLOC( BMSreallocMemoryArray(&conshdlr->propconss, newsize) ); conshdlr->propconsssize = newsize; } assert(num <= conshdlr->propconsssize); return SCIP_OKAY; } /** resizes updateconss array to be able to store at least num constraints */ static SCIP_RETCODE conshdlrEnsureUpdateconssMem( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ int num /**< minimal number of slots in array */ ) { assert(conshdlr != NULL); assert(set != NULL); if( num > conshdlr->updateconsssize ) { int newsize; newsize = SCIPsetCalcMemGrowSize(set, num); SCIP_ALLOC( BMSreallocMemoryArray(&conshdlr->updateconss, newsize) ); conshdlr->updateconsssize = newsize; } assert(num <= conshdlr->updateconsssize); return SCIP_OKAY; } /* * Constraint handler methods */ #define checkConssArrays(conshdlr) /**/ #ifndef NDEBUG #ifdef CHECKCONSARRAYS #undef checkConssArrays /** sanity check for the constraint arrays of the constraint handler (only in debug mode) */ static void checkConssArrays( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { int c; assert(conshdlr != NULL); assert(0 <= conshdlr->nactiveconss && conshdlr->nactiveconss <= conshdlr->nconss); for( c = 0; c < conshdlr->nconss; ++c ) { assert(conshdlr->conss[c] != NULL); assert(!conshdlr->conss[c]->original); assert(conshdlr->conss[c]->active == (c < conshdlr->nactiveconss)); assert(conshdlr->conss[c]->consspos == c); } for( c = 0; c < conshdlr->ninitconss; ++c ) { assert(conshdlr->initconss[c] != NULL); assert(!conshdlr->initconss[c]->original); assert(c < conshdlr->ninitconsskept || conshdlr->initconss[c]->active); assert(conshdlr->initconss[c]->initial); } for( c = 0; c < conshdlr->nsepaconss; ++c ) { assert(conshdlr->sepaconss[c] != NULL); assert(!conshdlr->sepaconss[c]->original); assert(conshdlr->sepaconss[c]->active); assert(conshdlr->sepaconss[c]->separate); assert(conshdlr->sepaconss[c]->sepaenabled); assert(conshdlr->sepaconss[c]->obsolete == (c >= conshdlr->nusefulsepaconss)); } for( c = 0; c < conshdlr->nenfoconss; ++c ) { assert(conshdlr->enfoconss[c] != NULL); assert(!conshdlr->enfoconss[c]->original); assert(conshdlr->enfoconss[c]->active); assert(conshdlr->enfoconss[c]->enforce); assert(conshdlr->enfoconss[c]->obsolete == (c >= conshdlr->nusefulenfoconss)); } for( c = 0; c < conshdlr->ncheckconss; ++c ) { assert(conshdlr->checkconss[c] != NULL); assert(!conshdlr->checkconss[c]->original); assert(conshdlr->checkconss[c]->active); assert(conshdlr->checkconss[c]->check); assert(conshdlr->checkconss[c]->obsolete == (c >= conshdlr->nusefulcheckconss)); } for( c = 0; c < conshdlr->npropconss; ++c ) { assert(conshdlr->propconss[c] != NULL); assert(!conshdlr->propconss[c]->original); assert(conshdlr->propconss[c]->active); assert(conshdlr->propconss[c]->propagate); assert(conshdlr->propconss[c]->propenabled); assert(conshdlr->propconss[c]->markpropagate == (c < conshdlr->nmarkedpropconss)); assert(conshdlr->propconss[c]->markpropagate || (conshdlr->propconss[c]->obsolete == (c >= conshdlr->nusefulpropconss))); } assert(conshdlr->nmarkedpropconss <= conshdlr->npropconss); } #endif #endif /** returns whether the constraint updates of the constraint handler are currently delayed */ static SCIP_Bool conshdlrAreUpdatesDelayed( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { return (conshdlr->delayupdatecount > 0); } /** returns the exponentially decaying weighted age average for age resets */ static SCIP_Real conshdlrGetAgeresetavg( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return MAX(conshdlr->ageresetavg, AGERESETAVG_MIN); } /** updates the exponentially decaying weighted age average for age resets after a constraint age was reset */ static void conshdlrUpdateAgeresetavg( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_Real age /**< age of the constraint that is reset to zero */ ) { assert(conshdlr != NULL); conshdlr->ageresetavg *= (1.0-AGERESETAVG_DECAY); conshdlr->ageresetavg += AGERESETAVG_DECAY * age; } /** returns whether the constraint's age exceeds the age limit */ static SCIP_Bool consExceedsAgelimit( SCIP_CONS* cons, /**< constraint to check */ SCIP_SET* set /**< global SCIP settings */ ) { assert(cons != NULL); assert(set != NULL); return (cons->dynamic && ((set->cons_agelimit > 0 && cons->age > set->cons_agelimit) || (set->cons_agelimit == 0 && cons->age > AGERESETAVG_AGELIMIT * conshdlrGetAgeresetavg(cons->conshdlr)))); } /** returns whether the constraint's age exceeds the obsolete age limit */ static SCIP_Bool consExceedsObsoleteage( SCIP_CONS* cons, /**< constraint to check */ SCIP_SET* set /**< global SCIP settings */ ) { assert(cons != NULL); assert(set != NULL); return (cons->dynamic && ((set->cons_obsoleteage > 0 && cons->age > set->cons_obsoleteage) || (set->cons_obsoleteage == 0 && cons->age > AGERESETAVG_OBSOLETEAGE * conshdlrGetAgeresetavg(cons->conshdlr)))); } /** marks constraint to be obsolete; it will be moved to the last part of the constraint arrays, such that * it is checked, enforced, separated, and propagated after the useful constraints */ static SCIP_RETCODE conshdlrMarkConsObsolete( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to be marked obsolete */ ) { SCIP_CONS* tmpcons; assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(cons != NULL); assert(!cons->original); assert(!cons->obsolete); assert(!conshdlrAreUpdatesDelayed(conshdlr)); cons->obsolete = TRUE; if( cons->active ) { if( cons->check ) { assert(0 <= cons->checkconsspos && cons->checkconsspos < conshdlr->nusefulcheckconss); /* switch the last useful (non-obsolete) check constraint with this constraint */ tmpcons = conshdlr->checkconss[conshdlr->nusefulcheckconss-1]; assert(tmpcons->checkconsspos == conshdlr->nusefulcheckconss-1); conshdlr->checkconss[conshdlr->nusefulcheckconss-1] = cons; conshdlr->checkconss[cons->checkconsspos] = tmpcons; tmpcons->checkconsspos = cons->checkconsspos; cons->checkconsspos = conshdlr->nusefulcheckconss-1; conshdlr->nusefulcheckconss--; } } if( cons->enabled ) { if( cons->separate && cons->sepaenabled ) { assert(0 <= cons->sepaconsspos && cons->sepaconsspos < conshdlr->nusefulsepaconss); if( cons->sepaconsspos < conshdlr->lastnusefulsepaconss ) conshdlr->lastnusefulsepaconss--; /* switch the last useful (non-obsolete) sepa constraint with this constraint */ tmpcons = conshdlr->sepaconss[conshdlr->nusefulsepaconss-1]; assert(tmpcons->sepaconsspos == conshdlr->nusefulsepaconss-1); conshdlr->sepaconss[conshdlr->nusefulsepaconss-1] = cons; conshdlr->sepaconss[cons->sepaconsspos] = tmpcons; tmpcons->sepaconsspos = cons->sepaconsspos; cons->sepaconsspos = conshdlr->nusefulsepaconss-1; conshdlr->nusefulsepaconss--; } if( cons->enforce ) { assert(0 <= cons->enfoconsspos && cons->enfoconsspos < conshdlr->nusefulenfoconss); if( cons->enfoconsspos < conshdlr->lastnusefulenfoconss ) conshdlr->lastnusefulenfoconss--; else { /* the constraint that becomes obsolete is not yet enforced on the current solution: * we have to make sure that it will be enforced the next time; this is not done, if the current * solution was already enforced and only enforcement on the additional constraints is performed * (because in this case, only the new useful constraints are enforced); * thus, we have to reset the enforcement counters in order to enforce all constraints again, especially * the now obsolete one; * this case should occur almost never, because a constraint that was not enforced in the last enforcement * is a newly added one, and it is very unlikely that this constraint will become obsolete before the next * enforcement call; * this reset is not performed for separation and propagation, because they are not vital for correctness */ conshdlr->lastenfolplpcount = -1; conshdlr->lastenfolpdomchgcount = -1; conshdlr->lastenfopsdomchgcount = -1; conshdlr->lastenforelaxdomchgcount = -1; conshdlr->lastenforelaxrelaxcount = -1; conshdlr->lastenfolpnode = -1; conshdlr->lastenfopsnode = -1; } /* switch the last useful (non-obsolete) enfo constraint with this constraint */ tmpcons = conshdlr->enfoconss[conshdlr->nusefulenfoconss-1]; assert(tmpcons->enfoconsspos == conshdlr->nusefulenfoconss-1); conshdlr->enfoconss[conshdlr->nusefulenfoconss-1] = cons; conshdlr->enfoconss[cons->enfoconsspos] = tmpcons; tmpcons->enfoconsspos = cons->enfoconsspos; cons->enfoconsspos = conshdlr->nusefulenfoconss-1; conshdlr->nusefulenfoconss--; } /* in case the constraint is marked to be propagated, we do not move it in the propconss array since the first * part of the array contains all marked constraints independently of their age */ assert((!cons->markpropagate) == (cons->propconsspos < conshdlr->nmarkedpropconss)); if( cons->propagate && cons->propenabled && !cons->markpropagate ) { assert(0 <= cons->propconsspos && cons->propconsspos < conshdlr->nusefulpropconss); if( cons->propconsspos < conshdlr->lastnusefulpropconss ) conshdlr->lastnusefulpropconss--; /* switch the last useful (non-obsolete) prop constraint with this constraint */ tmpcons = conshdlr->propconss[conshdlr->nusefulpropconss-1]; assert(tmpcons->propconsspos == conshdlr->nusefulpropconss-1); conshdlr->propconss[conshdlr->nusefulpropconss-1] = cons; conshdlr->propconss[cons->propconsspos] = tmpcons; tmpcons->propconsspos = cons->propconsspos; cons->propconsspos = conshdlr->nusefulpropconss-1; conshdlr->nusefulpropconss--; } } checkConssArrays(conshdlr); return SCIP_OKAY; } /** marks obsolete constraint to be not obsolete anymore; * it will be moved to the first part of the constraint arrays, such that it is checked, enforced, separated, * and propagated before the obsolete constraints */ static SCIP_RETCODE conshdlrMarkConsUseful( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to be marked obsolete */ ) { SCIP_CONS* tmpcons; assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(cons != NULL); assert(!cons->original); assert(cons->obsolete); assert(!conshdlrAreUpdatesDelayed(conshdlr)); cons->obsolete = FALSE; if( cons->active ) { if( cons->check ) { assert(conshdlr->nusefulcheckconss <= cons->checkconsspos && cons->checkconsspos < conshdlr->ncheckconss); /* switch the first obsolete check constraint with this constraint */ tmpcons = conshdlr->checkconss[conshdlr->nusefulcheckconss]; assert(tmpcons->checkconsspos == conshdlr->nusefulcheckconss); conshdlr->checkconss[conshdlr->nusefulcheckconss] = cons; conshdlr->checkconss[cons->checkconsspos] = tmpcons; tmpcons->checkconsspos = cons->checkconsspos; cons->checkconsspos = conshdlr->nusefulcheckconss; conshdlr->nusefulcheckconss++; } } if( cons->enabled ) { if( cons->separate && cons->sepaenabled ) { assert(conshdlr->nusefulsepaconss <= cons->sepaconsspos && cons->sepaconsspos < conshdlr->nsepaconss); /* switch the first obsolete sepa constraint with this constraint */ tmpcons = conshdlr->sepaconss[conshdlr->nusefulsepaconss]; assert(tmpcons->sepaconsspos == conshdlr->nusefulsepaconss); conshdlr->sepaconss[conshdlr->nusefulsepaconss] = cons; conshdlr->sepaconss[cons->sepaconsspos] = tmpcons; tmpcons->sepaconsspos = cons->sepaconsspos; cons->sepaconsspos = conshdlr->nusefulsepaconss; conshdlr->nusefulsepaconss++; } if( cons->enforce ) { assert(conshdlr->nusefulenfoconss <= cons->enfoconsspos && cons->enfoconsspos < conshdlr->nenfoconss); /* switch the first obsolete enfo constraint with this constraint */ tmpcons = conshdlr->enfoconss[conshdlr->nusefulenfoconss]; assert(tmpcons->enfoconsspos == conshdlr->nusefulenfoconss); conshdlr->enfoconss[conshdlr->nusefulenfoconss] = cons; conshdlr->enfoconss[cons->enfoconsspos] = tmpcons; tmpcons->enfoconsspos = cons->enfoconsspos; cons->enfoconsspos = conshdlr->nusefulenfoconss; conshdlr->nusefulenfoconss++; } /* in case the constraint is marked to be propagated, we do not move it in the propconss array since the first * part of the array contains all marked constraints independently of their age */ assert((!cons->markpropagate) == (cons->propconsspos < conshdlr->nmarkedpropconss)); if( cons->propagate && cons->propenabled && !cons->markpropagate) { assert(conshdlr->nusefulpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->npropconss); /* switch the first obsolete prop constraint with this constraint */ tmpcons = conshdlr->propconss[conshdlr->nusefulpropconss]; assert(tmpcons->propconsspos == conshdlr->nusefulpropconss); conshdlr->propconss[conshdlr->nusefulpropconss] = cons; conshdlr->propconss[cons->propconsspos] = tmpcons; tmpcons->propconsspos = cons->propconsspos; cons->propconsspos = conshdlr->nusefulpropconss; conshdlr->nusefulpropconss++; } } checkConssArrays(conshdlr); return SCIP_OKAY; } /** marks constraint to be propagated in the next propagation round; * * @note the propagation array is divided into three parts in contrast to the other constraint arrays; * the first part contains constraints which were marked to be propagated (independently of its age) * the second part contains the useful (non-obsolete) constraints which are not marked to be propagated * finally, the third part contains obsolete constraints which are not marked to be propagated * * @note if a constraint gets marked for propagation we put it into the first part regardless of its age */ static void conshdlrMarkConsPropagate( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to be marked obsolete */ ) { SCIP_CONS* tmpcons; assert(conshdlr != NULL); assert(conshdlr->nmarkedpropconss <= conshdlr->nusefulpropconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(cons != NULL); assert(!cons->original); /* it may happen that the constraint is deleted while updates are delayed: in this case we just return */ if( !cons->enabled ) return; if( cons->markpropagate ) return; cons->markpropagate = TRUE; /* propagation of the constraint is globally or locally disabled, so we do not have to move the constraint in the * propconss array */ if( !cons->propagate || !cons->propenabled ) { assert(cons->propconsspos == -1); return; } assert(cons->propconsspos >= conshdlr->nmarkedpropconss); /* if the constraint is obsolete, we need to move it first to the non-obsolete part of the array */ if( cons->obsolete ) { assert(conshdlr->nusefulpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->npropconss); /* switch the first obsolete prop constraint with this constraint */ tmpcons = conshdlr->propconss[conshdlr->nusefulpropconss]; assert(tmpcons->propconsspos == conshdlr->nusefulpropconss); conshdlr->propconss[conshdlr->nusefulpropconss] = cons; conshdlr->propconss[cons->propconsspos] = tmpcons; tmpcons->propconsspos = cons->propconsspos; cons->propconsspos = conshdlr->nusefulpropconss; conshdlr->nusefulpropconss++; } assert(conshdlr->nmarkedpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->nusefulpropconss); /* switch the first useful prop constraint with this constraint */ tmpcons = conshdlr->propconss[conshdlr->nmarkedpropconss]; assert(tmpcons->propconsspos == conshdlr->nmarkedpropconss); conshdlr->propconss[conshdlr->nmarkedpropconss] = cons; conshdlr->propconss[cons->propconsspos] = tmpcons; tmpcons->propconsspos = cons->propconsspos; cons->propconsspos = conshdlr->nmarkedpropconss; conshdlr->nmarkedpropconss++; assert(conshdlr->nmarkedpropconss <= conshdlr->npropconss); checkConssArrays(conshdlr); } /** unmarks constraint to be propagated in the next propagation round; * * @note the propagation array is divided into three parts in contrast to the other constraint arrays; * the first part contains constraints which were marked to be propagated (independently of its age) * the second part contains the useful (non-obsolete) constraints which are not marked to be propagated * finally, the third part contains obsolete constraints which are not marked to be propagated * * @note if a constraint gets unmarked for propagation, it is put into the right part depending on its age */ static void conshdlrUnmarkConsPropagate( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to be marked obsolete */ ) { SCIP_CONS* tmpcons; assert(conshdlr != NULL); assert(conshdlr->nmarkedpropconss <= conshdlr->nusefulpropconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(cons != NULL); assert(!cons->original); /* it may happen that the constraint is deleted while updates are delayed: in this case we just return */ if( !cons->enabled ) return; if( !cons->markpropagate ) return; cons->markpropagate = FALSE; /* propagation of the constraint is globally or locally disabled, so we do not have to move the constraint in the * propconss array */ if( !cons->propagate || !cons->propenabled ) { assert(cons->propconsspos == -1); return; } assert(cons->propconsspos >= 0); assert(cons->propconsspos < conshdlr->nmarkedpropconss); /* first, move the constraint out of the first part to the second part of the constraint array */ if( cons->propconsspos < conshdlr->nmarkedpropconss - 1 ) { conshdlr->nmarkedpropconss--; /* switch the last marked prop constraint with this constraint */ tmpcons = conshdlr->propconss[conshdlr->nmarkedpropconss]; assert(tmpcons->propconsspos == conshdlr->nmarkedpropconss); conshdlr->propconss[conshdlr->nmarkedpropconss] = cons; conshdlr->propconss[cons->propconsspos] = tmpcons; tmpcons->propconsspos = cons->propconsspos; cons->propconsspos = conshdlr->nmarkedpropconss; } else if( cons->propconsspos == conshdlr->nmarkedpropconss - 1 ) conshdlr->nmarkedpropconss--; assert(cons->propconsspos == conshdlr->nmarkedpropconss); /* if the constraint is obsolete, move it to the last part of the constraint array */ if( cons->obsolete ) { conshdlr->nusefulpropconss--; /* switch the last useful prop constraint with this constraint */ tmpcons = conshdlr->propconss[conshdlr->nusefulpropconss]; assert(tmpcons->propconsspos == conshdlr->nusefulpropconss); conshdlr->propconss[conshdlr->nusefulpropconss] = cons; conshdlr->propconss[cons->propconsspos] = tmpcons; tmpcons->propconsspos = cons->propconsspos; cons->propconsspos = conshdlr->nusefulpropconss; } checkConssArrays(conshdlr); } /** adds constraint to the conss array of constraint handler */ static SCIP_RETCODE conshdlrAddCons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_CONS* cons /**< constraint to add */ ) { assert(conshdlr != NULL); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(!cons->active); assert(cons->consspos == -1); assert(set != NULL); assert(cons->scip == set->scip); /* insert the constraint as inactive constraint into the transformed constraints array */ SCIP_CALL( conshdlrEnsureConssMem(conshdlr, set, conshdlr->nconss+1) ); conshdlr->conss[conshdlr->nconss] = cons; cons->consspos = conshdlr->nconss; conshdlr->nconss++; return SCIP_OKAY; } /** deletes constraint from the conss array of constraint handler */ static void conshdlrDelCons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to remove */ ) { assert(conshdlr != NULL); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(!cons->active); assert(conshdlr->nactiveconss <= cons->consspos && cons->consspos < conshdlr->nconss); conshdlr->conss[cons->consspos] = conshdlr->conss[conshdlr->nconss-1]; conshdlr->conss[cons->consspos]->consspos = cons->consspos; conshdlr->nconss--; cons->consspos = -1; } /** adds constraint to the initconss array of constraint handler */ static SCIP_RETCODE conshdlrAddInitcons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_CONS* cons /**< constraint to add */ ) { int insertpos; assert(conshdlr != NULL); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->active); assert(cons->initial); assert(cons->initconsspos == -1 || cons->initconsspos < conshdlr->ninitconsskept); SCIP_CALL( conshdlrEnsureInitconssMem(conshdlr, set, conshdlr->ninitconss+1) ); insertpos = conshdlr->ninitconss; conshdlr->initconss[insertpos] = cons; conshdlr->ninitconss++; stat->ninitconssadded++; /* if the constraint is kept, we keep the stored position at the beginning of the array */ if( cons->initconsspos == -1 ) cons->initconsspos = insertpos; checkConssArrays(conshdlr); return SCIP_OKAY; } /** deletes constraint from the initconss array of constraint handler */ static void conshdlrDelInitcons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to remove */ ) { int delpos; assert(conshdlr != NULL); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(0 <= cons->initconsspos && cons->initconsspos < conshdlr->ninitconss); delpos = cons->initconsspos; if( delpos < conshdlr->ninitconsskept ) { conshdlr->ninitconsskept--; conshdlr->initconss[delpos] = conshdlr->initconss[conshdlr->ninitconsskept]; conshdlr->initconss[delpos]->initconsspos = delpos; delpos = conshdlr->ninitconsskept; } if( delpos < conshdlr->ninitconss-1 ) { conshdlr->initconss[delpos] = conshdlr->initconss[conshdlr->ninitconss-1]; conshdlr->initconss[delpos]->initconsspos = delpos; } conshdlr->ninitconss--; cons->initconsspos = -1; checkConssArrays(conshdlr); } /** adds constraint to the sepaconss array of constraint handler */ static SCIP_RETCODE conshdlrAddSepacons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_CONS* cons /**< constraint to add */ ) { int insertpos; assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->active); assert(cons->separate); assert(cons->sepaenabled); assert(cons->sepaconsspos == -1); assert(set != NULL); assert(cons->scip == set->scip); assert(!conshdlrAreUpdatesDelayed(conshdlr) || !conshdlr->duringsepa); SCIP_CALL( conshdlrEnsureSepaconssMem(conshdlr, set, conshdlr->nsepaconss+1) ); insertpos = conshdlr->nsepaconss; if( !cons->obsolete ) { if( conshdlr->nusefulsepaconss < conshdlr->nsepaconss ) { conshdlr->sepaconss[conshdlr->nsepaconss] = conshdlr->sepaconss[conshdlr->nusefulsepaconss]; conshdlr->sepaconss[conshdlr->nsepaconss]->sepaconsspos = conshdlr->nsepaconss; insertpos = conshdlr->nusefulsepaconss; } conshdlr->nusefulsepaconss++; } conshdlr->sepaconss[insertpos] = cons; cons->sepaconsspos = insertpos; conshdlr->nsepaconss++; checkConssArrays(conshdlr); return SCIP_OKAY; } /** deletes constraint from the sepaconss array of constraint handler */ static void conshdlrDelSepacons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to remove */ ) { int delpos; assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->separate); assert(cons->sepaenabled); assert(cons->sepaconsspos != -1); assert(!conshdlrAreUpdatesDelayed(conshdlr) || !conshdlr->duringsepa); delpos = cons->sepaconsspos; if( !cons->obsolete ) { assert(0 <= delpos && delpos < conshdlr->nusefulsepaconss); if( delpos < conshdlr->lastnusefulsepaconss ) conshdlr->lastnusefulsepaconss--; conshdlr->sepaconss[delpos] = conshdlr->sepaconss[conshdlr->nusefulsepaconss-1]; conshdlr->sepaconss[delpos]->sepaconsspos = delpos; delpos = conshdlr->nusefulsepaconss-1; conshdlr->nusefulsepaconss--; assert(conshdlr->nusefulsepaconss >= 0); assert(conshdlr->lastnusefulsepaconss >= 0); } assert(conshdlr->nusefulsepaconss <= delpos && delpos < conshdlr->nsepaconss); if( delpos < conshdlr->nsepaconss-1 ) { conshdlr->sepaconss[delpos] = conshdlr->sepaconss[conshdlr->nsepaconss-1]; conshdlr->sepaconss[delpos]->sepaconsspos = delpos; } conshdlr->nsepaconss--; cons->sepaconsspos = -1; checkConssArrays(conshdlr); } /** adds constraint to the enfoconss array of constraint handler */ static SCIP_RETCODE conshdlrAddEnfocons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_CONS* cons /**< constraint to add */ ) { int insertpos; assert(conshdlr != NULL); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->active); assert(cons->enforce); assert(cons->enfoconsspos == -1); assert(set != NULL); assert(cons->scip == set->scip); SCIP_CALL( conshdlrEnsureEnfoconssMem(conshdlr, set, conshdlr->nenfoconss+1) ); insertpos = conshdlr->nenfoconss; if( !cons->obsolete ) { if( conshdlr->nusefulenfoconss < conshdlr->nenfoconss ) { conshdlr->enfoconss[conshdlr->nenfoconss] = conshdlr->enfoconss[conshdlr->nusefulenfoconss]; conshdlr->enfoconss[conshdlr->nenfoconss]->enfoconsspos = conshdlr->nenfoconss; insertpos = conshdlr->nusefulenfoconss; } conshdlr->nusefulenfoconss++; } else { /* we have to make sure that even this obsolete constraint is enforced in the next enforcement call; * if the same LP or pseudo solution is enforced again, only the newly added useful constraints are * enforced; thus, we have to reset the enforcement counters and force all constraints to be * enforced again; this is not needed for separation and propagation, because they are not vital for correctness */ conshdlr->lastenfolplpcount = -1; conshdlr->lastenfolpdomchgcount = -1; conshdlr->lastenfopsdomchgcount = -1; conshdlr->lastenforelaxdomchgcount = -1; conshdlr->lastenforelaxrelaxcount = -1; conshdlr->lastenfolpnode = -1; conshdlr->lastenfopsnode = -1; } conshdlr->enfoconss[insertpos] = cons; cons->enfoconsspos = insertpos; conshdlr->nenfoconss++; checkConssArrays(conshdlr); return SCIP_OKAY; } /** deletes constraint from the enfoconss array of constraint handler */ static void conshdlrDelEnfocons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to remove */ ) { int delpos; assert(conshdlr != NULL); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->enforce); assert(cons->enfoconsspos != -1); delpos = cons->enfoconsspos; if( !cons->obsolete ) { assert(0 <= delpos && delpos < conshdlr->nusefulenfoconss); if( delpos < conshdlr->lastnusefulenfoconss ) conshdlr->lastnusefulenfoconss--; conshdlr->enfoconss[delpos] = conshdlr->enfoconss[conshdlr->nusefulenfoconss-1]; conshdlr->enfoconss[delpos]->enfoconsspos = delpos; delpos = conshdlr->nusefulenfoconss-1; conshdlr->nusefulenfoconss--; /* if the constraint that moved to the free position was a newly added constraint and not enforced in the last * enforcement, we have to make sure it will be enforced in the next run; * this check is not performed for separation and propagation, because they are not vital for correctness */ if( delpos >= conshdlr->lastnusefulenfoconss ) conshdlr->lastnusefulenfoconss = cons->enfoconsspos; assert(conshdlr->nusefulenfoconss >= 0); assert(conshdlr->lastnusefulenfoconss >= 0); } assert(conshdlr->nusefulenfoconss <= delpos && delpos < conshdlr->nenfoconss); if( delpos < conshdlr->nenfoconss-1 ) { conshdlr->enfoconss[delpos] = conshdlr->enfoconss[conshdlr->nenfoconss-1]; conshdlr->enfoconss[delpos]->enfoconsspos = delpos; } conshdlr->nenfoconss--; cons->enfoconsspos = -1; checkConssArrays(conshdlr); } /** adds constraint to the checkconss array of constraint handler */ static SCIP_RETCODE conshdlrAddCheckcons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_CONS* cons /**< constraint to add */ ) { int insertpos; assert(conshdlr != NULL); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->active); assert(cons->check); assert(cons->checkconsspos == -1); assert(set != NULL); assert(cons->scip == set->scip); SCIP_CALL( conshdlrEnsureCheckconssMem(conshdlr, set, conshdlr->ncheckconss+1) ); insertpos = conshdlr->ncheckconss; if( !cons->obsolete ) { if( conshdlr->nusefulcheckconss < conshdlr->ncheckconss ) { assert(conshdlr->checkconss[conshdlr->nusefulcheckconss] != NULL); conshdlr->checkconss[conshdlr->ncheckconss] = conshdlr->checkconss[conshdlr->nusefulcheckconss]; conshdlr->checkconss[conshdlr->ncheckconss]->checkconsspos = conshdlr->ncheckconss; insertpos = conshdlr->nusefulcheckconss; } conshdlr->nusefulcheckconss++; } assert(0 <= insertpos && insertpos <= conshdlr->ncheckconss); conshdlr->checkconss[insertpos] = cons; cons->checkconsspos = insertpos; conshdlr->ncheckconss++; checkConssArrays(conshdlr); return SCIP_OKAY; } /** deletes constraint from the checkconss array of constraint handler */ static void conshdlrDelCheckcons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to add */ ) { int delpos; assert(conshdlr != NULL); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->active); assert(cons->check); assert(cons->checkconsspos != -1); delpos = cons->checkconsspos; if( !cons->obsolete ) { assert(0 <= delpos && delpos < conshdlr->nusefulcheckconss); conshdlr->checkconss[delpos] = conshdlr->checkconss[conshdlr->nusefulcheckconss-1]; conshdlr->checkconss[delpos]->checkconsspos = delpos; delpos = conshdlr->nusefulcheckconss-1; conshdlr->nusefulcheckconss--; } assert(conshdlr->nusefulcheckconss <= delpos && delpos < conshdlr->ncheckconss); if( delpos < conshdlr->ncheckconss-1 ) { conshdlr->checkconss[delpos] = conshdlr->checkconss[conshdlr->ncheckconss-1]; conshdlr->checkconss[delpos]->checkconsspos = delpos; } conshdlr->ncheckconss--; cons->checkconsspos = -1; checkConssArrays(conshdlr); } /** adds constraint to the propconss array of constraint handler */ static SCIP_RETCODE conshdlrAddPropcons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_CONS* cons /**< constraint to add */ ) { int insertpos; assert(conshdlr != NULL); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->active); assert(cons->enabled); assert(cons->propagate); assert(cons->propenabled); assert(cons->propconsspos == -1); assert(set != NULL); assert(cons->scip == set->scip); assert(!conshdlrAreUpdatesDelayed(conshdlr) || !conshdlr->duringprop); /* add constraint to the propagation array */ SCIP_CALL( conshdlrEnsurePropconssMem(conshdlr, set, conshdlr->npropconss+1) ); insertpos = conshdlr->npropconss; if( !cons->obsolete ) { if( conshdlr->nusefulpropconss < conshdlr->npropconss ) { conshdlr->propconss[conshdlr->npropconss] = conshdlr->propconss[conshdlr->nusefulpropconss]; conshdlr->propconss[conshdlr->npropconss]->propconsspos = conshdlr->npropconss; insertpos = conshdlr->nusefulpropconss; } conshdlr->nusefulpropconss++; } conshdlr->propconss[insertpos] = cons; cons->propconsspos = insertpos; conshdlr->npropconss++; /* if the constraint is marked to be propagated, we have to move it to the first part of the array */ if( cons->markpropagate ) { /* temporarily unmark the constraint to be propagated, such that we can use the method below */ cons->markpropagate = FALSE; conshdlrMarkConsPropagate(cons->conshdlr, cons); assert(cons->markpropagate); } checkConssArrays(conshdlr); return SCIP_OKAY; } /** deletes constraint from the propconss array of constraint handler */ static void conshdlrDelPropcons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to remove */ ) { int delpos; assert(conshdlr != NULL); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->propagate); assert(cons->propenabled); assert(cons->propconsspos != -1); assert(!conshdlrAreUpdatesDelayed(conshdlr) || !conshdlr->duringprop); /* unmark constraint to be propagated; this will move the constraint to the obsolete or non-obsolete part of the * array, depending on its age */ if( cons->markpropagate ) { conshdlrUnmarkConsPropagate(cons->conshdlr, cons); assert(!cons->markpropagate); } /* delete constraint from the propagation array */ delpos = cons->propconsspos; assert(delpos >= conshdlr->nmarkedpropconss); if( !cons->obsolete ) { assert(0 <= delpos && delpos < conshdlr->nusefulpropconss); if( delpos < conshdlr->lastnusefulpropconss ) conshdlr->lastnusefulpropconss--; conshdlr->propconss[delpos] = conshdlr->propconss[conshdlr->nusefulpropconss-1]; conshdlr->propconss[delpos]->propconsspos = delpos; delpos = conshdlr->nusefulpropconss-1; conshdlr->nusefulpropconss--; assert(conshdlr->nusefulpropconss >= 0); assert(conshdlr->lastnusefulpropconss >= 0); } assert(conshdlr->nusefulpropconss <= delpos && delpos < conshdlr->npropconss); if( delpos < conshdlr->npropconss-1 ) { conshdlr->propconss[delpos] = conshdlr->propconss[conshdlr->npropconss-1]; conshdlr->propconss[delpos]->propconsspos = delpos; } conshdlr->npropconss--; cons->propconsspos = -1; assert(conshdlr->nmarkedpropconss <= conshdlr->npropconss); checkConssArrays(conshdlr); } /** enables separation of constraint */ static SCIP_RETCODE conshdlrEnableConsSeparation( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_CONS* cons /**< constraint to add */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->sepaenabled); assert(cons->sepaconsspos == -1); assert(set != NULL); assert(cons->scip == set->scip); SCIPsetDebugMsg(set, "enable separation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name); /* enable separation of constraint */ cons->sepaenabled = TRUE; /* add constraint to the separation array */ if( cons->enabled && cons->separate ) { SCIP_CALL( conshdlrAddSepacons(conshdlr, set, cons) ); } return SCIP_OKAY; } /** disables separation of constraint */ static SCIP_RETCODE conshdlrDisableConsSeparation( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to remove */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(cons->sepaenabled); assert((cons->separate && cons->enabled) == (cons->sepaconsspos != -1)); SCIPdebugMessage("disable separation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name); /* delete constraint from the separation array */ if( cons->separate && cons->enabled ) { conshdlrDelSepacons(conshdlr, cons); } assert(cons->sepaconsspos == -1); /* disable separation of constraint */ cons->sepaenabled = FALSE; return SCIP_OKAY; } /** enables propagation of constraint */ static SCIP_RETCODE conshdlrEnableConsPropagation( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_CONS* cons /**< constraint to add */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(!cons->propenabled); assert(cons->propconsspos == -1); assert(set != NULL); assert(cons->scip == set->scip); SCIPsetDebugMsg(set, "enable propagation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name); /* enable propagation of constraint */ cons->propenabled = TRUE; /* add constraint to the propagation array */ if( cons->enabled && cons->propagate ) { SCIP_CALL( conshdlrAddPropcons(conshdlr, set, cons) ); } return SCIP_OKAY; } /** disables propagation of constraint */ static SCIP_RETCODE conshdlrDisableConsPropagation( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONS* cons /**< constraint to remove */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(cons->propenabled); assert((cons->propagate && cons->enabled) == (cons->propconsspos != -1)); SCIPdebugMessage("disable propagation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name); /* delete constraint from the propagation array */ if( cons->propagate && cons->enabled ) { conshdlrDelPropcons(conshdlr, cons); } assert(cons->propconsspos == -1); /* disable propagation of constraint */ cons->propenabled = FALSE; return SCIP_OKAY; } /** enables separation, enforcement, and propagation of constraint */ static SCIP_RETCODE conshdlrEnableCons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_CONS* cons /**< constraint to add */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(set != NULL); assert(stat != NULL); assert(cons != NULL); assert(cons->scip == set->scip); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->active); assert(!cons->enabled); assert(cons->sepaconsspos == -1); assert(cons->enfoconsspos == -1); assert(cons->propconsspos == -1); SCIPsetDebugMsg(set, "enable constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name); /* enable constraint */ cons->enabled = TRUE; conshdlr->nenabledconss++; stat->nenabledconss++; /* add constraint to the separation array */ if( cons->separate && cons->sepaenabled ) { SCIP_CALL( conshdlrAddSepacons(conshdlr, set, cons) ); } /* add constraint to the enforcement array */ if( cons->enforce ) { SCIP_CALL( conshdlrAddEnfocons(conshdlr, set, cons) ); } /* add constraint to the propagation array */ if( cons->propagate && cons->propenabled ) { SCIP_CALL( conshdlrAddPropcons(conshdlr, set, cons) ); } /* call constraint handler's enabling notification method */ if( conshdlr->consenable != NULL ) { SCIP_CALL( conshdlr->consenable(set->scip, conshdlr, cons) ); } checkConssArrays(conshdlr); return SCIP_OKAY; } /** disables separation, enforcement, and propagation of constraint */ static SCIP_RETCODE conshdlrDisableCons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_CONS* cons /**< constraint to remove */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(set != NULL); assert(stat != NULL); assert(cons != NULL); assert(cons->scip == set->scip); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->active); assert(cons->enabled); assert((cons->separate && cons->sepaenabled) == (cons->sepaconsspos != -1)); assert(cons->enforce == (cons->enfoconsspos != -1)); assert((cons->propagate && cons->propenabled) == (cons->propconsspos != -1)); SCIPsetDebugMsg(set, "disable constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name); /* call constraint handler's disabling notification method */ if( conshdlr->consdisable != NULL ) { SCIP_CALL( conshdlr->consdisable(set->scip, conshdlr, cons) ); } /* delete constraint from the separation array */ if( cons->separate && cons->sepaenabled ) { conshdlrDelSepacons(conshdlr, cons); } /* delete constraint from the enforcement array */ if( cons->enforce ) { conshdlrDelEnfocons(conshdlr, cons); } /* delete constraint from the propagation array */ if( cons->propagate && cons->propenabled ) { conshdlrDelPropcons(conshdlr, cons); } assert(cons->sepaconsspos == -1); assert(cons->enfoconsspos == -1); assert(cons->propconsspos == -1); /* disable constraint */ cons->enabled = FALSE; conshdlr->nenabledconss--; stat->nenabledconss--; checkConssArrays(conshdlr); return SCIP_OKAY; } /** activates and adds constraint to constraint handler's constraint arrays */ static SCIP_RETCODE conshdlrActivateCons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_CONS* cons, /**< constraint to add */ int depth, /**< depth in the tree where the activation takes place, or -1 for global problem */ SCIP_Bool focusnode /**< does the constraint activation take place at the focus node? */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(set != NULL); assert(stat != NULL); assert(cons != NULL); assert(cons->scip == set->scip); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(!cons->active); assert(!cons->enabled); assert(conshdlr->nactiveconss <= cons->consspos && cons->consspos < conshdlr->nconss); assert(conshdlr->conss[cons->consspos] == cons); assert(cons->initconsspos < conshdlr->ninitconsskept); assert(cons->sepaconsspos == -1); assert(cons->enfoconsspos == -1); assert(cons->checkconsspos == -1); assert(cons->propconsspos == -1); assert(depth >= -1); SCIPsetDebugMsg(set, "activate constraint <%s> in constraint handler <%s> (depth %d, focus=%u)\n", cons->name, conshdlr->name, depth, focusnode); /* activate constraint, switch positions with first inactive constraint */ cons->active = TRUE; cons->activedepth = depth; conshdlr->conss[cons->consspos] = conshdlr->conss[conshdlr->nactiveconss]; conshdlr->conss[cons->consspos]->consspos = cons->consspos; conshdlr->conss[conshdlr->nactiveconss] = cons; cons->consspos = conshdlr->nactiveconss; conshdlr->nactiveconss++; conshdlr->maxnactiveconss = MAX(conshdlr->maxnactiveconss, conshdlr->nactiveconss); stat->nactiveconss++; /* add constraint to the check array */ if( cons->check ) { SCIP_CALL( conshdlrAddCheckcons(conshdlr, set, cons) ); } /* add constraint to the initconss array if the constraint is initial and added to the focus node */ if( cons->initial ) { SCIP_CALL( conshdlrAddInitcons(conshdlr, set, stat, cons) ); } /* call constraint handler's activation notification method */ if( conshdlr->consactive != NULL ) { SCIP_CALL( conshdlr->consactive(set->scip, conshdlr, cons) ); } /* enable separation, enforcement, and propagation of constraint */ SCIP_CALL( conshdlrEnableCons(conshdlr, set, stat, cons) ); assert(0 <= cons->consspos && cons->consspos < conshdlr->nactiveconss); checkConssArrays(conshdlr); return SCIP_OKAY; } /** deactivates and removes constraint from constraint handler's conss array */ static SCIP_RETCODE conshdlrDeactivateCons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_CONS* cons /**< constraint to remove */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(set != NULL); assert(stat != NULL); assert(cons != NULL); assert(cons->scip == set->scip); assert(cons->conshdlr == conshdlr); assert(!cons->original); assert(cons->active); assert(0 <= cons->consspos && cons->consspos < conshdlr->nactiveconss); assert(conshdlr->conss[cons->consspos] == cons); assert(cons->check == (cons->checkconsspos != -1)); SCIPsetDebugMsg(set, "deactivate constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name); /* disable constraint */ if( cons->enabled ) { SCIP_CALL( conshdlrDisableCons(conshdlr, set, stat, cons) ); } assert(!cons->enabled); /* call constraint handler's deactivation notification method */ if( conshdlr->consdeactive != NULL ) { SCIP_CALL( conshdlr->consdeactive(set->scip, conshdlr, cons) ); } /* delete constraint from the initconss array */ if( cons->initconsspos >= 0 ) { conshdlrDelInitcons(conshdlr, cons); } /* delete constraint from the check array */ if( cons->check ) { conshdlrDelCheckcons(conshdlr, cons); } /* switch constraint with the last active constraint in the conss array */ conshdlr->conss[cons->consspos] = conshdlr->conss[conshdlr->nactiveconss-1]; conshdlr->conss[cons->consspos]->consspos = cons->consspos; conshdlr->conss[conshdlr->nactiveconss-1] = cons; cons->consspos = conshdlr->nactiveconss-1; conshdlr->nactiveconss--; cons->active = FALSE; cons->activedepth = -2; stat->nactiveconss--; assert(conshdlr->nactiveconss <= cons->consspos && cons->consspos < conshdlr->nconss); assert(cons->initconsspos == -1); assert(cons->sepaconsspos == -1); assert(cons->enfoconsspos == -1); assert(cons->checkconsspos == -1); assert(cons->propconsspos == -1); checkConssArrays(conshdlr); return SCIP_OKAY; } /** processes all delayed updates of constraints: * recently (de)activated constraints will be (de)activated; * recently en/disabled constraints will be en/disabled; * recent obsolete non-check constraints will be globally deleted; * recent obsolete check constraints will be moved to the last positions in the sepa-, enfo-, check-, and prop-arrays; * recent useful constraints will be moved to the first positions in the sepa-, enfo-, check-, and prop-arrays; * constraints which were recently marked to be propagated are moved to the first positions in the prop-array; * no longer used constraints will be freed and removed from the conss array */ static SCIP_RETCODE conshdlrProcessUpdates( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { SCIP_CONS* cons; int i; assert(conshdlr != NULL); assert(!conshdlrAreUpdatesDelayed(conshdlr)); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); SCIPsetDebugMsg(set, "processing %d constraints that have to be updated in constraint handler <%s>\n", conshdlr->nupdateconss, conshdlr->name); for( i = conshdlr->nupdateconss - 1; i >= 0; --i ) { cons = conshdlr->updateconss[i]; assert(cons != NULL); assert(cons->conshdlr == conshdlr); assert(cons->update); assert(cons->updateinsert || cons->updateactivate || cons->updatedeactivate || cons->updateenable || cons->updatedisable || cons->updatesepaenable || cons->updatesepadisable || cons->updatepropenable || cons->updatepropdisable || cons->updateobsolete || cons->updatefree || cons->updatemarkpropagate || cons->updateunmarkpropagate); SCIPsetDebugMsg(set, " -> constraint <%s>: insert=%u, activate=%u, deactivate=%u, enable=%u, disable=%u, sepaenable=%u, sepadisable=%u, propenable=%u, propdisable=%u, obsolete=%u, free=%u (consdata=%p)\n", cons->name, cons->updateinsert, cons->updateactivate, cons->updatedeactivate, cons->updateenable, cons->updatedisable, cons->updatesepaenable, cons->updatesepadisable, cons->updatepropenable, cons->updatepropdisable, cons->updateobsolete, cons->updatefree, (void*)cons->consdata); if( cons->updateinsert ) { SCIP_CALL( conshdlrAddCons(conshdlr, set, cons) ); cons->updateinsert = FALSE; } if( cons->updateactivate ) { assert(!cons->active); assert(!cons->updatedeactivate); assert(!cons->updateenable); assert(!cons->updatedisable); assert(!cons->updateobsolete); assert(!cons->updatefree); /* the activation depth was already stored in SCIPconsActivate() */ SCIP_CALL( conshdlrActivateCons(conshdlr, set, stat, cons, cons->activedepth, cons->updateactfocus) ); assert(cons->active); cons->updateactivate = FALSE; } else if( cons->updatedeactivate ) { assert(cons->active); SCIP_CALL( conshdlrDeactivateCons(conshdlr, set, stat, cons) ); assert(!cons->active); cons->updatedeactivate = FALSE; cons->updateenable = FALSE; cons->updatedisable = FALSE; cons->obsolete = consExceedsObsoleteage(cons, set); cons->updateobsolete = FALSE; } else if( cons->updateenable ) { assert(!cons->enabled); assert(!cons->updatedisable); SCIP_CALL( conshdlrEnableCons(conshdlr, set, stat, cons) ); assert(cons->enabled); cons->updateenable = FALSE; } else if( cons->updatedisable ) { assert(cons->enabled); SCIP_CALL( conshdlrDisableCons(conshdlr, set, stat, cons) ); assert(!cons->enabled); cons->updatedisable = FALSE; } if( cons->updatesepaenable ) { assert(!cons->updatesepadisable); if( !cons->sepaenabled ) { SCIP_CALL( conshdlrEnableConsSeparation(conshdlr, set, cons) ); assert(cons->sepaenabled); } cons->updatesepaenable = FALSE; } else if( cons->updatesepadisable ) { if( cons->sepaenabled ) { SCIP_CALL( conshdlrDisableConsSeparation(conshdlr, cons) ); assert(!cons->sepaenabled); } cons->updatesepadisable = FALSE; } if( cons->updatepropenable ) { assert(!cons->updatepropdisable); if( !cons->propenabled ) { SCIP_CALL( conshdlrEnableConsPropagation(conshdlr, set, cons) ); assert(cons->propenabled); } cons->updatepropenable = FALSE; } else if( cons->updatepropdisable ) { if( cons->propenabled ) { SCIP_CALL( conshdlrDisableConsPropagation(conshdlr, cons) ); assert(!cons->propenabled); } cons->updatepropdisable = FALSE; } if( cons->updatefree ) { /* nothing to do here: the constraint is freed, when it is released from the updateconss array */ assert(cons->nuses == 1); /* it only exists in the updateconss array */ cons->updatefree = FALSE; cons->updateobsolete = FALSE; } else { if( cons->updateobsolete ) { if( !cons->obsolete && consExceedsObsoleteage(cons, set) ) { /* the constraint's status must be switched to obsolete */ SCIP_CALL( conshdlrMarkConsObsolete(conshdlr, cons) ); } else if( cons->obsolete && !consExceedsObsoleteage(cons, set) ) { /* the constraint's status must be switched to useful */ SCIP_CALL( conshdlrMarkConsUseful(conshdlr, cons) ); } cons->updateobsolete = FALSE; } if( cons->updatemarkpropagate ) { /* the constraint must be marked to be propagated */ conshdlrMarkConsPropagate(conshdlr, cons); cons->updatemarkpropagate = FALSE; } else if( cons->updateunmarkpropagate ) { /* the constraint must be unmarked to be propagated */ conshdlrUnmarkConsPropagate(conshdlr, cons); cons->updateunmarkpropagate = FALSE; } } assert(!cons->updateinsert); assert(!cons->updateactivate); assert(!cons->updatedeactivate); assert(!cons->updateenable); assert(!cons->updatedisable); assert(!cons->updatesepaenable); assert(!cons->updatesepadisable); assert(!cons->updatepropenable); assert(!cons->updatepropdisable); assert(!cons->updateobsolete); assert(!cons->updatemarkpropagate); assert(!cons->updateunmarkpropagate); assert(!cons->updatefree); cons->update = FALSE; /* release the constraint */ SCIP_CALL( SCIPconsRelease(&conshdlr->updateconss[i], blkmem, set) ); } conshdlr->nupdateconss = 0; return SCIP_OKAY; } /** marks constraint handler to delay all constraint updates until the next conshdlrProcessUpdates() call */ static void conshdlrDelayUpdates( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); SCIPdebugMessage("constraint updates of constraint handler <%s> will be delayed (count:%d)\n", conshdlr->name, conshdlr->delayupdatecount+1); conshdlr->delayupdatecount++; } /** marks constraint handler to perform all constraint updates immediately; * all delayed constraint updates will be processed */ static SCIP_RETCODE conshdlrForceUpdates( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { assert(conshdlr != NULL); assert(conshdlrAreUpdatesDelayed(conshdlr)); SCIPsetDebugMsg(set, "constraint updates of constraint handler <%s> will be processed immediately (count:%d)\n", conshdlr->name, conshdlr->delayupdatecount); conshdlr->delayupdatecount--; /* only run the update if all delays are taken away (reference counting) */ if( !conshdlrAreUpdatesDelayed(conshdlr) ) { SCIP_CALL( conshdlrProcessUpdates(conshdlr, blkmem, set, stat) ); assert(conshdlr->nupdateconss == 0); } return SCIP_OKAY; } /** adds constraint to constraint handler's update constraint array and captures it */ static SCIP_RETCODE conshdlrAddUpdateCons( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_CONS* cons /**< constraint to add */ ) { assert(conshdlr != NULL); assert(set != NULL); assert(cons != NULL); assert(cons->conshdlr == conshdlr); if( !cons->update ) { SCIPsetDebugMsg(set, "constraint <%s> of age %g has to be updated in constraint handler <%s> (consdata=%p)\n", cons->name, cons->age, conshdlr->name, (void*)cons->consdata); /* add constraint to the updateconss array */ SCIP_CALL( conshdlrEnsureUpdateconssMem(conshdlr, set, conshdlr->nupdateconss+1) ); conshdlr->updateconss[conshdlr->nupdateconss] = cons; conshdlr->nupdateconss++; /* capture constraint */ SCIPconsCapture(cons); cons->update = TRUE; } return SCIP_OKAY; } /** compares two constraint handlers w. r. to their separation priority */ SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompSepa) { /*lint --e{715}*/ return ((SCIP_CONSHDLR*)elem2)->sepapriority - ((SCIP_CONSHDLR*)elem1)->sepapriority; } /** compares two constraint handlers w. r. to their enforcing priority */ SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompEnfo) { /*lint --e{715}*/ return ((SCIP_CONSHDLR*)elem2)->enfopriority - ((SCIP_CONSHDLR*)elem1)->enfopriority; } /** compares two constraint handlers w. r. to their feasibility check priority */ SCIP_DECL_SORTPTRCOMP(SCIPconshdlrCompCheck) { /*lint --e{715}*/ return ((SCIP_CONSHDLR*)elem2)->checkpriority - ((SCIP_CONSHDLR*)elem1)->checkpriority; } /** copies the given constraint handler to a new scip */ SCIP_RETCODE SCIPconshdlrCopyInclude( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< SCIP_SET of SCIP to copy to */ SCIP_Bool* valid /**< was the copying process valid? */ ) { assert(conshdlr != NULL); assert(set != NULL); assert(valid != NULL); assert(set->scip != NULL); if( conshdlr->conshdlrcopy != NULL ) { SCIPsetDebugMsg(set, "including constraint handler %s in subscip %p\n", SCIPconshdlrGetName(conshdlr), (void*)set->scip); SCIP_CALL( conshdlr->conshdlrcopy(set->scip, conshdlr, valid) ); } return SCIP_OKAY; } /** internal method for creating a constraint handler */ static SCIP_RETCODE doConshdlrCreate( SCIP_CONSHDLR** conshdlr, /**< pointer to constraint handler data structure */ SCIP_SET* set, /**< global SCIP settings */ SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ BMS_BLKMEM* blkmem, /**< block memory for parameter settings */ const char* name, /**< name of constraint handler */ const char* desc, /**< description of constraint handler */ int sepapriority, /**< priority of the constraint handler for separation */ int enfopriority, /**< priority of the constraint handler for constraint enforcing */ int checkpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */ int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */ int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */ int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation, * propagation and enforcement, -1 for no eager evaluations, 0 for first only */ int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */ SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */ SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */ SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */ SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */ SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */ SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */ SCIP_DECL_CONSFREE ((*consfree)), /**< destructor of constraint handler */ SCIP_DECL_CONSINIT ((*consinit)), /**< initialize constraint handler */ SCIP_DECL_CONSEXIT ((*consexit)), /**< deinitialize constraint handler */ SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */ SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */ SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */ SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */ SCIP_DECL_CONSDELETE ((*consdelete)), /**< free specific constraint data */ SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */ SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */ SCIP_DECL_CONSSEPALP ((*conssepalp)), /**< separate cutting planes for LP solution */ SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */ SCIP_DECL_CONSENFOLP ((*consenfolp)), /**< enforcing constraints for LP solutions */ SCIP_DECL_CONSENFORELAX ((*consenforelax)), /**< enforcing constraints for relaxation solutions */ SCIP_DECL_CONSENFOPS ((*consenfops)), /**< enforcing constraints for pseudo solutions */ SCIP_DECL_CONSCHECK ((*conscheck)), /**< check feasibility of primal solution */ SCIP_DECL_CONSPROP ((*consprop)), /**< propagate variable domains */ SCIP_DECL_CONSPRESOL ((*conspresol)), /**< presolving method */ SCIP_DECL_CONSRESPROP ((*consresprop)), /**< propagation conflict resolving method */ SCIP_DECL_CONSLOCK ((*conslock)), /**< variable rounding lock method */ SCIP_DECL_CONSACTIVE ((*consactive)), /**< activation notification method */ SCIP_DECL_CONSDEACTIVE((*consdeactive)), /**< deactivation notification method */ SCIP_DECL_CONSENABLE ((*consenable)), /**< enabling notification method */ SCIP_DECL_CONSDISABLE ((*consdisable)), /**< disabling notification method */ SCIP_DECL_CONSDELVARS ((*consdelvars)), /**< variable deletion method */ SCIP_DECL_CONSPRINT ((*consprint)), /**< constraint display method */ SCIP_DECL_CONSCOPY ((*conscopy)), /**< constraint copying method */ SCIP_DECL_CONSPARSE ((*consparse)), /**< constraint parsing method */ SCIP_DECL_CONSGETVARS ((*consgetvars)), /**< constraint get variables method */ SCIP_DECL_CONSGETNVARS((*consgetnvars)), /**< constraint get number of variable method */ SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */ SCIP_CONSHDLRDATA* conshdlrdata /**< constraint handler data */ ) { char paramname[SCIP_MAXSTRLEN]; char paramdesc[SCIP_MAXSTRLEN]; assert(conshdlr != NULL); assert(name != NULL); assert(desc != NULL); assert(conssepalp != NULL || conssepasol != NULL || sepafreq == -1); assert(consprop != NULL || propfreq == -1); assert(eagerfreq >= -1); assert(!needscons || ((conshdlrcopy == NULL) == (conscopy == NULL))); /* the interface change from delay flags to timings cannot be recognized at compile time: Exit with an appropriate * error message */ if( presoltiming < SCIP_PRESOLTIMING_NONE || presoltiming > SCIP_PRESOLTIMING_MAX ) { SCIPmessagePrintError("ERROR: 'PRESOLDELAY'-flag no longer available since SCIP 3.2, use an appropriate " "'SCIP_PRESOLTIMING' for <%s> constraint handler instead.\n", name); return SCIP_PARAMETERWRONGVAL; } /* both callbacks have to exist or not exist */ assert((consgetvars != NULL) == (consgetnvars != NULL)); SCIP_ALLOC( BMSallocMemory(conshdlr) ); BMSclearMemory(*conshdlr); SCIP_ALLOC( BMSduplicateMemoryArray(&(*conshdlr)->name, name, strlen(name)+1) ); SCIP_ALLOC( BMSduplicateMemoryArray(&(*conshdlr)->desc, desc, strlen(desc)+1) ); (*conshdlr)->sepapriority = sepapriority; (*conshdlr)->enfopriority = enfopriority; (*conshdlr)->checkpriority = checkpriority; (*conshdlr)->sepafreq = sepafreq; (*conshdlr)->propfreq = propfreq; (*conshdlr)->eagerfreq = eagerfreq; (*conshdlr)->maxprerounds = maxprerounds; (*conshdlr)->conshdlrcopy = conshdlrcopy; (*conshdlr)->consfree = consfree; (*conshdlr)->consinit = consinit; (*conshdlr)->consexit = consexit; (*conshdlr)->consinitpre = consinitpre; (*conshdlr)->consexitpre = consexitpre; (*conshdlr)->consinitsol = consinitsol; (*conshdlr)->consexitsol = consexitsol; (*conshdlr)->consdelete = consdelete; (*conshdlr)->constrans = constrans; (*conshdlr)->consinitlp = consinitlp; (*conshdlr)->conssepalp = conssepalp; (*conshdlr)->conssepasol = conssepasol; (*conshdlr)->consenfolp = consenfolp; (*conshdlr)->consenforelax = consenforelax; (*conshdlr)->consenfops = consenfops; (*conshdlr)->conscheck = conscheck; (*conshdlr)->consprop = consprop; (*conshdlr)->conspresol = conspresol; (*conshdlr)->consresprop = consresprop; (*conshdlr)->conslock = conslock; (*conshdlr)->consactive = consactive; (*conshdlr)->consdeactive = consdeactive; (*conshdlr)->consenable = consenable; (*conshdlr)->consdisable = consdisable; (*conshdlr)->consprint = consprint; (*conshdlr)->consdelvars = consdelvars; (*conshdlr)->conscopy = conscopy; (*conshdlr)->consparse = consparse; (*conshdlr)->consgetvars = consgetvars; (*conshdlr)->consgetnvars = consgetnvars; (*conshdlr)->conshdlrdata = conshdlrdata; (*conshdlr)->consgetdivebdchgs = consgetdivebdchgs; (*conshdlr)->conss = NULL; (*conshdlr)->consssize = 0; (*conshdlr)->nconss = 0; (*conshdlr)->nactiveconss = 0; (*conshdlr)->maxnactiveconss = 0; (*conshdlr)->startnactiveconss = 0; (*conshdlr)->initconss = NULL; (*conshdlr)->initconsssize = 0; (*conshdlr)->ninitconss = 0; (*conshdlr)->ninitconsskept = 0; (*conshdlr)->sepaconss = NULL; (*conshdlr)->sepaconsssize = 0; (*conshdlr)->nsepaconss = 0; (*conshdlr)->nusefulsepaconss = 0; (*conshdlr)->enfoconss = NULL; (*conshdlr)->enfoconsssize = 0; (*conshdlr)->nenfoconss = 0; (*conshdlr)->nusefulenfoconss = 0; (*conshdlr)->checkconss = NULL; (*conshdlr)->checkconsssize = 0; (*conshdlr)->ncheckconss = 0; (*conshdlr)->nusefulcheckconss = 0; (*conshdlr)->propconss = NULL; (*conshdlr)->propconsssize = 0; (*conshdlr)->npropconss = 0; (*conshdlr)->nusefulpropconss = 0; (*conshdlr)->nmarkedpropconss = 0; (*conshdlr)->updateconss = NULL; (*conshdlr)->updateconsssize = 0; (*conshdlr)->nupdateconss = 0; (*conshdlr)->nenabledconss = 0; (*conshdlr)->lastnusefulpropconss = 0; (*conshdlr)->lastnusefulsepaconss = 0; (*conshdlr)->lastnusefulenfoconss = 0; (*conshdlr)->storedpropconss = NULL; (*conshdlr)->storedpropconsssize = 0; (*conshdlr)->storednmarkedpropconss = 0; (*conshdlr)->storedpropdomchgcount = 0; SCIP_CALL( SCIPclockCreate(&(*conshdlr)->setuptime, SCIP_CLOCKTYPE_DEFAULT) ); SCIP_CALL( SCIPclockCreate(&(*conshdlr)->presoltime, SCIP_CLOCKTYPE_DEFAULT) ); SCIP_CALL( SCIPclockCreate(&(*conshdlr)->sepatime, SCIP_CLOCKTYPE_DEFAULT) ); SCIP_CALL( SCIPclockCreate(&(*conshdlr)->enfolptime, SCIP_CLOCKTYPE_DEFAULT) ); SCIP_CALL( SCIPclockCreate(&(*conshdlr)->enfopstime, SCIP_CLOCKTYPE_DEFAULT) ); SCIP_CALL( SCIPclockCreate(&(*conshdlr)->enforelaxtime, SCIP_CLOCKTYPE_DEFAULT) ); SCIP_CALL( SCIPclockCreate(&(*conshdlr)->proptime, SCIP_CLOCKTYPE_DEFAULT) ); SCIP_CALL( SCIPclockCreate(&(*conshdlr)->sbproptime, SCIP_CLOCKTYPE_DEFAULT) ); SCIP_CALL( SCIPclockCreate(&(*conshdlr)->checktime, SCIP_CLOCKTYPE_DEFAULT) ); SCIP_CALL( SCIPclockCreate(&(*conshdlr)->resproptime, SCIP_CLOCKTYPE_DEFAULT) ); (*conshdlr)->nsepacalls = 0; (*conshdlr)->nenfolpcalls = 0; (*conshdlr)->nenfopscalls = 0; (*conshdlr)->nenforelaxcalls = 0; (*conshdlr)->npropcalls = 0; (*conshdlr)->ncheckcalls = 0; (*conshdlr)->nrespropcalls = 0; (*conshdlr)->ncutoffs = 0; (*conshdlr)->ncutsfound = 0; (*conshdlr)->ncutsapplied = 0; (*conshdlr)->nconssfound = 0; (*conshdlr)->ndomredsfound = 0; (*conshdlr)->nchildren = 0; (*conshdlr)->lastpropdomchgcount = -1; (*conshdlr)->lastsepalpcount = -1; (*conshdlr)->lastenfolplpcount = -1; (*conshdlr)->lastenfolpdomchgcount = -1; (*conshdlr)->lastenfopsdomchgcount = -1; (*conshdlr)->lastenforelaxdomchgcount = -1; (*conshdlr)->lastenforelaxrelaxcount = -1; (*conshdlr)->lastenfolpnode = -1; (*conshdlr)->lastenfopsnode = -1; (*conshdlr)->lastenfolpresult = SCIP_DIDNOTRUN; (*conshdlr)->lastenfopsresult = SCIP_DIDNOTRUN; (*conshdlr)->lastenforelaxresult = SCIP_DIDNOTRUN; (*conshdlr)->lastnfixedvars = 0; (*conshdlr)->lastnaggrvars = 0; (*conshdlr)->lastnchgvartypes = 0; (*conshdlr)->lastnchgbds = 0; (*conshdlr)->lastnaddholes = 0; (*conshdlr)->lastndelconss = 0; (*conshdlr)->lastnaddconss = 0; (*conshdlr)->lastnupgdconss = 0; (*conshdlr)->lastnchgcoefs = 0; (*conshdlr)->lastnchgsides = 0; (*conshdlr)->nfixedvars = 0; (*conshdlr)->naggrvars = 0; (*conshdlr)->nchgvartypes = 0; (*conshdlr)->nchgbds = 0; (*conshdlr)->naddholes = 0; (*conshdlr)->ndelconss = 0; (*conshdlr)->naddconss = 0; (*conshdlr)->nupgdconss = 0; (*conshdlr)->nchgcoefs = 0; (*conshdlr)->nchgsides = 0; (*conshdlr)->npresolcalls = 0; (*conshdlr)->delayupdatecount = 0; (*conshdlr)->ageresetavg = AGERESETAVG_INIT; (*conshdlr)->needscons = needscons; (*conshdlr)->sepalpwasdelayed = FALSE; (*conshdlr)->sepasolwasdelayed = FALSE; (*conshdlr)->propwasdelayed = FALSE; (*conshdlr)->duringsepa = FALSE; (*conshdlr)->duringprop = FALSE; (*conshdlr)->initialized = FALSE; /* add parameters */ (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/sepafreq", name); SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, "frequency for separating cuts (-1: never, 0: only in root node)", &(*conshdlr)->sepafreq, FALSE, sepafreq, -1, SCIP_MAXTREEDEPTH, NULL, NULL) ); (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/propfreq", name); SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, "frequency for propagating domains (-1: never, 0: only in root node)", &(*conshdlr)->propfreq, FALSE, propfreq, -1, SCIP_MAXTREEDEPTH, NULL, NULL) ); (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/proptiming", name); (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "timing when constraint propagation should be called (%u:BEFORELP, %u:DURINGLPLOOP, %u:AFTERLPLOOP, %u:ALWAYS)", SCIP_PROPTIMING_BEFORELP, SCIP_PROPTIMING_DURINGLPLOOP, SCIP_PROPTIMING_AFTERLPLOOP, SCIP_PROPTIMING_ALWAYS); SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc, (int*)(&(*conshdlr)->proptiming), TRUE, (int) proptiming, (int) SCIP_PROPTIMING_BEFORELP, (int) SCIP_PROPTIMING_ALWAYS, NULL, NULL) ); /*lint !e713*/ (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/eagerfreq", name); SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, "frequency for using all instead of only the useful constraints in separation, propagation and enforcement (-1: never, 0: only in first evaluation)", &(*conshdlr)->eagerfreq, TRUE, eagerfreq, -1, SCIP_MAXTREEDEPTH, NULL, NULL) ); (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/maxprerounds", name); SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, "maximal number of presolving rounds the constraint handler participates in (-1: no limit)", &(*conshdlr)->maxprerounds, TRUE, maxprerounds, -1, INT_MAX, NULL, NULL) ); (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/delaysepa", name); SCIP_CALL( SCIPsetAddBoolParam(set, messagehdlr, blkmem, paramname, "should separation method be delayed, if other separators found cuts?", &(*conshdlr)->delaysepa, TRUE, delaysepa, NULL, NULL) ); /*lint !e740*/ (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/delayprop", name); SCIP_CALL( SCIPsetAddBoolParam(set, messagehdlr, blkmem, paramname, "should propagation method be delayed, if other propagators found reductions?", &(*conshdlr)->delayprop, TRUE, delayprop, NULL, NULL) ); /*lint !e740*/ (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/presoltiming", name); (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "timing mask of the constraint handler's presolving method (%u:FAST, %u:MEDIUM, %u:EXHAUSTIVE, %u:FINAL)", SCIP_PRESOLTIMING_FAST, SCIP_PRESOLTIMING_MEDIUM, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FINAL); SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc, (int*)&(*conshdlr)->presoltiming, TRUE, (int) presoltiming, (int) SCIP_PRESOLTIMING_FAST, (int) SCIP_PRESOLTIMING_MAX, NULL, NULL) ); /*lint !e740 !e713*/ return SCIP_OKAY; } /** creates a constraint handler */ SCIP_RETCODE SCIPconshdlrCreate( SCIP_CONSHDLR** conshdlr, /**< pointer to constraint handler data structure */ SCIP_SET* set, /**< global SCIP settings */ SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ BMS_BLKMEM* blkmem, /**< block memory for parameter settings */ const char* name, /**< name of constraint handler */ const char* desc, /**< description of constraint handler */ int sepapriority, /**< priority of the constraint handler for separation */ int enfopriority, /**< priority of the constraint handler for constraint enforcing */ int checkpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */ int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */ int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */ int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation, * propagation and enforcement, -1 for no eager evaluations, 0 for first only */ int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */ SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */ SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */ SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */ SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */ SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */ SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */ SCIP_DECL_CONSFREE ((*consfree)), /**< destructor of constraint handler */ SCIP_DECL_CONSINIT ((*consinit)), /**< initialize constraint handler */ SCIP_DECL_CONSEXIT ((*consexit)), /**< deinitialize constraint handler */ SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */ SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */ SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */ SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */ SCIP_DECL_CONSDELETE ((*consdelete)), /**< free specific constraint data */ SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */ SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */ SCIP_DECL_CONSSEPALP ((*conssepalp)), /**< separate cutting planes for LP solution */ SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */ SCIP_DECL_CONSENFOLP ((*consenfolp)), /**< enforcing constraints for LP solutions */ SCIP_DECL_CONSENFORELAX ((*consenforelax)), /**< enforcing constraints for relaxation solutions */ SCIP_DECL_CONSENFOPS ((*consenfops)), /**< enforcing constraints for pseudo solutions */ SCIP_DECL_CONSCHECK ((*conscheck)), /**< check feasibility of primal solution */ SCIP_DECL_CONSPROP ((*consprop)), /**< propagate variable domains */ SCIP_DECL_CONSPRESOL ((*conspresol)), /**< presolving method */ SCIP_DECL_CONSRESPROP ((*consresprop)), /**< propagation conflict resolving method */ SCIP_DECL_CONSLOCK ((*conslock)), /**< variable rounding lock method */ SCIP_DECL_CONSACTIVE ((*consactive)), /**< activation notification method */ SCIP_DECL_CONSDEACTIVE((*consdeactive)), /**< deactivation notification method */ SCIP_DECL_CONSENABLE ((*consenable)), /**< enabling notification method */ SCIP_DECL_CONSDISABLE ((*consdisable)), /**< disabling notification method */ SCIP_DECL_CONSDELVARS ((*consdelvars)), /**< variable deletion method */ SCIP_DECL_CONSPRINT ((*consprint)), /**< constraint display method */ SCIP_DECL_CONSCOPY ((*conscopy)), /**< constraint copying method */ SCIP_DECL_CONSPARSE ((*consparse)), /**< constraint parsing method */ SCIP_DECL_CONSGETVARS ((*consgetvars)), /**< constraint get variables method */ SCIP_DECL_CONSGETNVARS((*consgetnvars)), /**< constraint get number of variable method */ SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */ SCIP_CONSHDLRDATA* conshdlrdata /**< constraint handler data */ ) { assert(conshdlr != NULL); assert(name != NULL); assert(desc != NULL); assert(conssepalp != NULL || conssepasol != NULL || sepafreq == -1); assert(consprop != NULL || propfreq == -1); assert(eagerfreq >= -1); assert(!needscons || ((conshdlrcopy == NULL) == (conscopy == NULL))); SCIP_CALL_FINALLY( doConshdlrCreate(conshdlr, set, messagehdlr, blkmem, name, desc, sepapriority, enfopriority, checkpriority, sepafreq, propfreq, eagerfreq, maxprerounds, delaysepa, delayprop, needscons, proptiming, presoltiming, conshdlrcopy, consfree, consinit, consexit, consinitpre, consexitpre, consinitsol, consexitsol, consdelete, constrans, consinitlp, conssepalp, conssepasol, consenfolp, consenforelax, consenfops, conscheck, consprop, conspresol, consresprop, conslock, consactive, consdeactive, consenable, consdisable, consdelvars, consprint, conscopy, consparse, consgetvars, consgetnvars, consgetdivebdchgs, conshdlrdata), (void) SCIPconshdlrFree(conshdlr, set) ); return SCIP_OKAY; } /*lint !e715*/ /** calls destructor and frees memory of constraint handler */ SCIP_RETCODE SCIPconshdlrFree( SCIP_CONSHDLR** conshdlr, /**< pointer to constraint handler data structure */ SCIP_SET* set /**< global SCIP settings */ ) { assert(conshdlr != NULL); if( *conshdlr == NULL ) return SCIP_OKAY; assert(!(*conshdlr)->initialized); assert((*conshdlr)->nconss == 0); assert(set != NULL); /* call destructor of constraint handler */ if( (*conshdlr)->consfree != NULL ) { SCIP_CALL( (*conshdlr)->consfree(set->scip, *conshdlr) ); } SCIPclockFree(&(*conshdlr)->resproptime); SCIPclockFree(&(*conshdlr)->checktime); SCIPclockFree(&(*conshdlr)->sbproptime); SCIPclockFree(&(*conshdlr)->proptime); SCIPclockFree(&(*conshdlr)->enforelaxtime); SCIPclockFree(&(*conshdlr)->enfopstime); SCIPclockFree(&(*conshdlr)->enfolptime); SCIPclockFree(&(*conshdlr)->sepatime); SCIPclockFree(&(*conshdlr)->presoltime); SCIPclockFree(&(*conshdlr)->setuptime); BMSfreeMemoryArrayNull(&(*conshdlr)->name); BMSfreeMemoryArrayNull(&(*conshdlr)->desc); BMSfreeMemoryArrayNull(&(*conshdlr)->conss); BMSfreeMemoryArrayNull(&(*conshdlr)->initconss); BMSfreeMemoryArrayNull(&(*conshdlr)->sepaconss); BMSfreeMemoryArrayNull(&(*conshdlr)->enfoconss); BMSfreeMemoryArrayNull(&(*conshdlr)->checkconss); BMSfreeMemoryArrayNull(&(*conshdlr)->propconss); BMSfreeMemoryArrayNull(&(*conshdlr)->updateconss); BMSfreeMemoryArrayNull(&(*conshdlr)->storedpropconss); BMSfreeMemory(conshdlr); return SCIP_OKAY; } /** calls initialization method of constraint handler */ SCIP_RETCODE SCIPconshdlrInit( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { assert(conshdlr != NULL); assert(set != NULL); if( conshdlr->initialized ) { SCIPerrorMessage("constraint handler <%s> already initialized\n", conshdlr->name); return SCIP_INVALIDCALL; } if( set->misc_resetstat ) { SCIPclockReset(conshdlr->setuptime); SCIPclockReset(conshdlr->presoltime); SCIPclockReset(conshdlr->sepatime); SCIPclockReset(conshdlr->enfolptime); SCIPclockReset(conshdlr->enfopstime); SCIPclockReset(conshdlr->enforelaxtime); SCIPclockReset(conshdlr->proptime); SCIPclockReset(conshdlr->sbproptime); SCIPclockReset(conshdlr->checktime); SCIPclockReset(conshdlr->resproptime); conshdlr->nsepacalls = 0; conshdlr->nenfolpcalls = 0; conshdlr->nenfopscalls = 0; conshdlr->nenforelaxcalls = 0; conshdlr->npropcalls = 0; conshdlr->ncheckcalls = 0; conshdlr->nrespropcalls = 0; conshdlr->ncutoffs = 0; conshdlr->ncutsfound = 0; conshdlr->ncutsapplied = 0; conshdlr->nconssfound = 0; conshdlr->ndomredsfound = 0; conshdlr->nchildren = 0; conshdlr->lastpropdomchgcount = -1; conshdlr->lastenfolpdomchgcount = -1; conshdlr->lastenfopsdomchgcount = -1; conshdlr->lastenforelaxdomchgcount = -1; conshdlr->lastenforelaxrelaxcount = -1; conshdlr->lastenfolpnode = -1; conshdlr->lastenfopsnode = -1; conshdlr->lastenfolpresult = SCIP_DIDNOTRUN; conshdlr->lastenfopsresult = SCIP_DIDNOTRUN; conshdlr->maxnactiveconss = conshdlr->nactiveconss; conshdlr->startnactiveconss = 0; conshdlr->lastsepalpcount = -1; conshdlr->lastenfolplpcount = -1; conshdlr->lastnusefulpropconss = 0; conshdlr->lastnusefulsepaconss = 0; conshdlr->lastnusefulenfoconss = 0; conshdlr->lastnfixedvars = 0; conshdlr->lastnaggrvars = 0; conshdlr->lastnchgvartypes = 0; conshdlr->lastnchgbds = 0; conshdlr->lastnaddholes = 0; conshdlr->lastndelconss = 0; conshdlr->lastnaddconss = 0; conshdlr->lastnupgdconss = 0; conshdlr->lastnchgcoefs = 0; conshdlr->lastnchgsides = 0; conshdlr->nfixedvars = 0; conshdlr->naggrvars = 0; conshdlr->nchgvartypes = 0; conshdlr->nchgbds = 0; conshdlr->naddholes = 0; conshdlr->ndelconss = 0; conshdlr->naddconss = 0; conshdlr->nupgdconss = 0; conshdlr->nchgcoefs = 0; conshdlr->nchgsides = 0; conshdlr->npresolcalls = 0; conshdlr->ageresetavg = AGERESETAVG_INIT; conshdlr->sepalpwasdelayed = FALSE; conshdlr->sepasolwasdelayed = FALSE; conshdlr->propwasdelayed = FALSE; } /* call initialization method of constraint handler */ if( conshdlr->consinit != NULL ) { /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->setuptime, set); /* call external method */ SCIP_CALL( conshdlr->consinit(set->scip, conshdlr, conshdlr->conss, conshdlr->nconss) ); /* stop timing */ SCIPclockStop(conshdlr->setuptime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); } conshdlr->initialized = TRUE; assert(!conshdlrAreUpdatesDelayed(conshdlr)); return SCIP_OKAY; } /** calls exit method of constraint handler */ SCIP_RETCODE SCIPconshdlrExit( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { assert(conshdlr != NULL); assert(set != NULL); if( !conshdlr->initialized ) { SCIPerrorMessage("constraint handler <%s> not initialized\n", conshdlr->name); return SCIP_INVALIDCALL; } /* call deinitialization method of constraint handler */ if( conshdlr->consexit != NULL ) { /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->setuptime, set); /* call external method */ SCIP_CALL( conshdlr->consexit(set->scip, conshdlr, conshdlr->conss, conshdlr->nconss) ); /* stop timing */ SCIPclockStop(conshdlr->setuptime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); } conshdlr->initialized = FALSE; return SCIP_OKAY; } /** informs constraint handler that the presolving process is being started */ SCIP_RETCODE SCIPconshdlrInitpre( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { assert(conshdlr != NULL); assert(set != NULL); /* reset conshdlr last presolved data in case of a restart */ conshdlr->lastpropdomchgcount = -1; conshdlr->lastenfolpdomchgcount = -1; conshdlr->lastenfopsdomchgcount = -1; conshdlr->lastenforelaxdomchgcount = -1; conshdlr->lastenforelaxrelaxcount = -1; conshdlr->lastenfolpnode = -1; conshdlr->lastenfopsnode = -1; conshdlr->lastenfolpresult = SCIP_DIDNOTRUN; conshdlr->lastenfopsresult = SCIP_DIDNOTRUN; conshdlr->lastenforelaxresult = SCIP_DIDNOTRUN; conshdlr->maxnactiveconss = conshdlr->nactiveconss; conshdlr->startnactiveconss = 0; conshdlr->lastsepalpcount = -1; conshdlr->lastenfolplpcount = -1; conshdlr->lastnusefulpropconss = 0; conshdlr->lastnusefulsepaconss = 0; conshdlr->lastnusefulenfoconss = 0; conshdlr->lastnfixedvars = 0; conshdlr->lastnaggrvars = 0; conshdlr->lastnchgvartypes = 0; conshdlr->lastnchgbds = 0; conshdlr->lastnaddholes = 0; conshdlr->lastndelconss = 0; conshdlr->lastnaddconss = 0; conshdlr->lastnupgdconss = 0; conshdlr->lastnchgcoefs = 0; conshdlr->lastnchgsides = 0; conshdlr->propwasdelayed = FALSE; /* call presolving initialization method of constraint handler */ if( conshdlr->consinitpre != NULL ) { /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->setuptime, set); /* call external method */ SCIP_CALL( conshdlr->consinitpre(set->scip, conshdlr, conshdlr->conss, conshdlr->nconss) ); /* stop timing */ SCIPclockStop(conshdlr->setuptime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); } /* after a restart the LP is empty but the initial constraints are not included in the initialconss array anymore; * we have to put them back into this array in order to obtain the correct initial root relaxation */ if( stat->nruns >= 2 ) { int c; for( c = 0; c < conshdlr->nconss; ++c ) { /**@todo should only active constraints be added to the initconss array? at least cons->active is asserted in * conshdlrAddInitcons(conshdlr, set, conshdlr->conss[c]) */ if( conshdlr->conss[c]->addarraypos >= 0 && !conshdlr->conss[c]->deleted && conshdlr->conss[c]->initial && conshdlr->conss[c]->initconsspos == -1 ) { SCIP_CALL( conshdlrAddInitcons(conshdlr, set, stat, conshdlr->conss[c]) ); } } } return SCIP_OKAY; } /** informs constraint handler that the presolving is finished */ SCIP_RETCODE SCIPconshdlrExitpre( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { assert(conshdlr != NULL); assert(set != NULL); /* call presolving deinitialization method of constraint handler */ if( conshdlr->consexitpre != NULL ) { /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->setuptime, set); /* call external method */ SCIP_CALL( conshdlr->consexitpre(set->scip, conshdlr, conshdlr->conss, conshdlr->nconss) ); /* stop timing */ SCIPclockStop(conshdlr->setuptime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); } /* update statistics */ conshdlr->maxnactiveconss = conshdlr->nactiveconss; conshdlr->startnactiveconss = conshdlr->nactiveconss; return SCIP_OKAY; } /** informs constraint handler that the branch and bound process is being started */ SCIP_RETCODE SCIPconshdlrInitsol( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { assert(conshdlr != NULL); assert(set != NULL); assert(stat != NULL); conshdlr->sepalpwasdelayed = FALSE; conshdlr->sepasolwasdelayed = FALSE; /* call solving process initialization method of constraint handler */ if( conshdlr->consinitsol != NULL ) { /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->setuptime, set); /* call external method */ SCIP_CALL( conshdlr->consinitsol(set->scip, conshdlr, conshdlr->conss, conshdlr->nconss) ); /* stop timing */ SCIPclockStop(conshdlr->setuptime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); } return SCIP_OKAY; } /** informs constraint handler that the branch and bound process data is being freed */ SCIP_RETCODE SCIPconshdlrExitsol( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_Bool restart /**< was this exit solve call triggered by a restart? */ ) { assert(conshdlr != NULL); assert(set != NULL); /* call solving process deinitialization method of constraint handler */ if( conshdlr->consexitsol != NULL ) { /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->setuptime, set); /* call external method */ SCIP_CALL( conshdlr->consexitsol(set->scip, conshdlr, conshdlr->conss, conshdlr->nconss, restart) ); /* stop timing */ SCIPclockStop(conshdlr->setuptime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); } return SCIP_OKAY; } /** calls LP initialization method of constraint handler to separate all initial active constraints */ SCIP_RETCODE SCIPconshdlrInitLP( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_TREE* tree, /**< branch and bound tree */ SCIP_Bool initkeptconss, /**< Also initialize constraints which are valid at a more global node, * but were not activated there? Should be FALSE for repeated calls at * one node or if the current focusnode is a child of the former one */ SCIP_Bool* cutoff /**< pointer to store whether infeasibility was detected while building the LP */ ) { assert(conshdlr != NULL); assert(cutoff != NULL); #ifdef MORE_DEBUG assert(stat->nnodes > 1 || conshdlr->ninitconsskept == 0 || SCIPtreeProbing(tree)); #endif *cutoff = FALSE; if( conshdlr->consinitlp != NULL ) { int currentdepth; int oldninitconss; int c; SCIPsetDebugMsg(set, "initializing LP with %d initial constraints of handler <%s> (ninitconss=%d, kept=%d, initkept=%u)\n", initkeptconss ? conshdlr->ninitconss : conshdlr->ninitconss - conshdlr->ninitconsskept, conshdlr->name, conshdlr->ninitconss, conshdlr->ninitconsskept, initkeptconss); /* no constraints to initialize (or only kept constraints which do not need to be initialized this time) -> return */ if( conshdlr->needscons && (conshdlr->ninitconss == 0 || (!initkeptconss && conshdlr->ninitconss == conshdlr->ninitconsskept)) ) return SCIP_OKAY; /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); oldninitconss = conshdlr->ninitconss; /* start timing */ SCIPclockStart(conshdlr->sepatime, set); if( initkeptconss ) { /* add all kept initial constraints which are currently active to the second part of the initconss array */ /* @todo keep track of where a constraint was already initialized (e.g., in the conssetchg)? */ for( c = 0; c < conshdlr->ninitconsskept; ++c ) { assert(conshdlr->initconss[c]->initconsspos == c); if( SCIPconsIsActive(conshdlr->initconss[c]) ) { SCIP_CALL( conshdlrAddInitcons(conshdlr, set, stat, conshdlr->initconss[c]) ); } } } /* call external method */ SCIP_CALL( conshdlr->consinitlp(set->scip, conshdlr, &conshdlr->initconss[conshdlr->ninitconsskept], conshdlr->ninitconss - conshdlr->ninitconsskept, cutoff) ); /* stop timing */ SCIPclockStop(conshdlr->sepatime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); currentdepth = SCIPtreeGetCurrentDepth(tree); assert(currentdepth >= 0); /* clear the initconss array */ for( c = conshdlr->ninitconsskept; c < oldninitconss; ++c ) { assert(SCIPconsGetActiveDepth(conshdlr->initconss[c]) >= -1); assert(SCIPconsGetActiveDepth(conshdlr->initconss[c]) <= currentdepth); /* if the constraint was not initialized at its valid node, we keep it */ if( currentdepth > 0 ? SCIPconsGetActiveDepth(conshdlr->initconss[c]) != currentdepth : SCIPconsGetActiveDepth(conshdlr->initconss[c]) > 0 ) { conshdlr->initconss[conshdlr->ninitconsskept] = conshdlr->initconss[c]; conshdlr->initconss[conshdlr->ninitconsskept]->initconsspos = conshdlr->ninitconsskept; ++(conshdlr->ninitconsskept); } else conshdlr->initconss[c]->initconsspos = -1; } #ifndef NDEBUG for( ; c < conshdlr->ninitconss; ++c ) assert(conshdlr->initconss[c]->initconsspos < conshdlr->ninitconsskept); #endif conshdlr->ninitconss = conshdlr->ninitconsskept; if( conshdlr->ninitconss == 0 ) { BMSfreeMemoryArrayNull(&conshdlr->initconss); conshdlr->initconsssize = 0; } } return SCIP_OKAY; } /** calls separator method of constraint handler to separate LP solution */ SCIP_RETCODE SCIPconshdlrSeparateLP( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_SEPASTORE* sepastore, /**< separation storage */ int depth, /**< depth of current node */ SCIP_Bool execdelayed, /**< execute separation method even if it is marked to be delayed */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(stat != NULL); assert(conshdlr->lastsepalpcount != stat->lpcount || (0 <= conshdlr->lastnusefulsepaconss && conshdlr->lastnusefulsepaconss <= conshdlr->nusefulsepaconss)); assert(set != NULL); assert(result != NULL); *result = SCIP_DIDNOTRUN; if( conshdlr->conssepalp != NULL && ((depth == 0 && conshdlr->sepafreq == 0) || (conshdlr->sepafreq > 0 && depth % conshdlr->sepafreq == 0) || conshdlr->sepalpwasdelayed) ) { /* check, if separation method should be delayed */ if( !conshdlr->delaysepa || execdelayed ) { int nconss; int nusefulconss; int firstcons; /* check, if this LP solution was already separated */ if( conshdlr->lastsepalpcount == stat->lpcount ) { /* all constraints that were not yet separated on the new LP solution must be useful constraints, which means, * that the new constraints are the last constraints of the useful ones */ nconss = conshdlr->nusefulsepaconss - conshdlr->lastnusefulsepaconss; nusefulconss = nconss; firstcons = conshdlr->lastnusefulsepaconss; } else { /* on a new LP solution, we want to separate all constraints */ nconss = conshdlr->nsepaconss; nusefulconss = conshdlr->nusefulsepaconss; firstcons = 0; } assert(firstcons >= 0); assert(firstcons + nconss <= conshdlr->nsepaconss); assert(nusefulconss <= nconss); /* constraint handlers without constraints should only be called once */ if( nconss > 0 || (!conshdlr->needscons && conshdlr->lastsepalpcount != stat->lpcount) ) { SCIP_CONS** conss; SCIP_Longint oldndomchgs; SCIP_Longint oldnprobdomchgs; SCIP_Longint lastsepalpcount; int oldncuts; int oldnactiveconss; int lastnusefulsepaconss; SCIPsetDebugMsg(set, "separating constraints %d to %d of %d constraints of handler <%s> (%s LP solution)\n", firstcons, firstcons + nconss - 1, conshdlr->nsepaconss, conshdlr->name, conshdlr->lastsepalpcount == stat->lpcount ? "old" : "new"); /* remember the number of processed constraints on the current LP solution */ lastsepalpcount = stat->lpcount; lastnusefulsepaconss = conshdlr->nusefulsepaconss; /* get the array of the constraints to be processed */ conss = &(conshdlr->sepaconss[firstcons]); oldndomchgs = stat->nboundchgs + stat->nholechgs; oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs; oldncuts = SCIPsepastoreGetNCuts(sepastore); oldnactiveconss = stat->nactiveconss; /* check, if we want to use eager evaluation */ if( (conshdlr->eagerfreq == 0 && conshdlr->nsepacalls == 0) || (conshdlr->eagerfreq > 0 && conshdlr->nsepacalls % conshdlr->eagerfreq == 0) ) nusefulconss = nconss; /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); conshdlr->duringsepa = TRUE; /* start timing */ SCIPclockStart(conshdlr->sepatime, set); /* call external method */ SCIP_CALL( conshdlr->conssepalp(set->scip, conshdlr, conss, nconss, nusefulconss, result) ); SCIPsetDebugMsg(set, " -> separating LP returned result <%d>\n", *result); /* stop timing */ SCIPclockStop(conshdlr->sepatime, set); /* perform the cached constraint updates */ conshdlr->duringsepa = FALSE; SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); /* update statistics */ if( *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED ) { conshdlr->lastsepalpcount = lastsepalpcount; conshdlr->lastnusefulsepaconss = MIN(lastnusefulsepaconss, conshdlr->nusefulsepaconss); conshdlr->nsepacalls++; } if( *result == SCIP_CUTOFF ) conshdlr->ncutoffs++; conshdlr->ncutsfound += SCIPsepastoreGetNCuts(sepastore) - oldncuts; /*lint !e776*/ conshdlr->nconssfound += MAX(stat->nactiveconss - oldnactiveconss, 0); /*lint !e776*/ /* update domain reductions; therefore remove the domain * reduction counts which were generated in probing mode */ conshdlr->ndomredsfound += stat->nboundchgs + stat->nholechgs - oldndomchgs; conshdlr->ndomredsfound -= (stat->nprobboundchgs + stat->nprobholechgs - oldnprobdomchgs); /* evaluate result */ if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_SEPARATED && *result != SCIP_NEWROUND && *result != SCIP_DIDNOTFIND && *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED ) { SCIPerrorMessage("LP separation method of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } } } else { SCIPsetDebugMsg(set, "LP separation method of constraint handler <%s> was delayed\n", conshdlr->name); *result = SCIP_DELAYED; } /* remember whether separation method was delayed */ conshdlr->sepalpwasdelayed = (*result == SCIP_DELAYED); } return SCIP_OKAY; } /** calls separator method of constraint handler to separate given primal solution */ SCIP_RETCODE SCIPconshdlrSeparateSol( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_SEPASTORE* sepastore, /**< separation storage */ SCIP_SOL* sol, /**< primal solution that should be separated */ int depth, /**< depth of current node */ SCIP_Bool execdelayed, /**< execute separation method even if it is marked to be delayed */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(set != NULL); assert(stat != NULL); assert(result != NULL); *result = SCIP_DIDNOTRUN; if( conshdlr->conssepasol != NULL && ((depth == 0 && conshdlr->sepafreq == 0) || (conshdlr->sepafreq > 0 && depth % conshdlr->sepafreq == 0) || conshdlr->sepasolwasdelayed) ) { /* check, if separation method should be delayed */ if( !conshdlr->delaysepa || execdelayed ) { int nconss; int nusefulconss; /* always separate all constraints */ nconss = conshdlr->nsepaconss; nusefulconss = conshdlr->nusefulsepaconss; assert(nusefulconss <= nconss); if( nconss > 0 || !conshdlr->needscons ) { SCIP_CONS** conss; SCIP_Longint oldndomchgs; SCIP_Longint oldnprobdomchgs; int oldncuts; int oldnactiveconss; SCIPsetDebugMsg(set, "separating %d constraints of handler <%s> (primal solution %p)\n", nconss, conshdlr->name, (void*)sol); /* get the array of the constraints to be processed */ conss = conshdlr->sepaconss; oldndomchgs = stat->nboundchgs + stat->nholechgs; oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs; oldncuts = SCIPsepastoreGetNCuts(sepastore); oldnactiveconss = stat->nactiveconss; /* check, if we want to use eager evaluation */ if( (conshdlr->eagerfreq == 0 && conshdlr->nsepacalls == 0) || (conshdlr->eagerfreq > 0 && conshdlr->nsepacalls % conshdlr->eagerfreq == 0) ) nusefulconss = nconss; /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); conshdlr->duringsepa = TRUE; /* start timing */ SCIPclockStart(conshdlr->sepatime, set); /* call external method */ SCIP_CALL( conshdlr->conssepasol(set->scip, conshdlr, conss, nconss, nusefulconss, sol, result) ); SCIPsetDebugMsg(set, " -> separating sol returned result <%d>\n", *result); /* stop timing */ SCIPclockStop(conshdlr->sepatime, set); /* perform the cached constraint updates */ conshdlr->duringsepa = FALSE; SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); /* update statistics */ if( *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED ) conshdlr->nsepacalls++; if( *result == SCIP_CUTOFF ) conshdlr->ncutoffs++; conshdlr->ncutsfound += SCIPsepastoreGetNCuts(sepastore) - oldncuts; /*lint !e776*/ conshdlr->nconssfound += MAX(stat->nactiveconss - oldnactiveconss, 0); /*lint !e776*/ /* update domain reductions; therefore remove the domain * reduction counts which were generated in probing mode */ conshdlr->ndomredsfound += stat->nboundchgs + stat->nholechgs - oldndomchgs; conshdlr->ndomredsfound -= (stat->nprobboundchgs + stat->nprobholechgs - oldnprobdomchgs); /* evaluate result */ if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_SEPARATED && *result != SCIP_NEWROUND && *result != SCIP_DIDNOTFIND && *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED ) { SCIPerrorMessage("SOL separation method of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } } } else { SCIPsetDebugMsg(set, "SOL separation method of constraint handler <%s> was delayed\n", conshdlr->name); *result = SCIP_DELAYED; } /* remember whether separation method was delayed */ conshdlr->sepasolwasdelayed = (*result == SCIP_DELAYED); } return SCIP_OKAY; } /** calls enforcing method of constraint handler for a relaxation solution for all constraints added after last * conshdlrResetEnfo() call */ SCIP_RETCODE SCIPconshdlrEnforceRelaxSol( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_TREE* tree, /**< branch and bound tree */ SCIP_SEPASTORE* sepastore, /**< separation storage */ SCIP_SOL* relaxsol, /**< solution to be enforced */ SCIP_Bool solinfeasible, /**< was the solution already found out to be infeasible? */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { int nconss; int nusefulconss; int firstcons; SCIP_Bool relaxchanged; SCIP_Bool lastinfeasible; assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(stat != NULL); assert(conshdlr->lastenfopsdomchgcount != stat->domchgcount || conshdlr->lastenfopsnode != stat->nnodes || (0 <= conshdlr->lastnusefulenfoconss && conshdlr->lastnusefulenfoconss <= conshdlr->nusefulenfoconss)); assert(set != NULL); assert(tree != NULL); assert(tree->nchildren == 0); assert(relaxsol != NULL); assert(result != NULL); *result = SCIP_FEASIBLE; /* check, if this relaxation solution was already enforced at this node * the integrality constraint handler always needs to be enforced for all constraints since external branching * candidates are cleared before each resolve */ if( conshdlr->lastenforelaxrelaxcount == stat->relaxcount && conshdlr->lastenforelaxdomchgcount == stat->domchgcount && conshdlr->lastenforelaxnode == stat->nnodes && conshdlr->lastenforelaxresult != SCIP_CONSADDED && conshdlr->lastenforelaxresult != SCIP_SOLVELP && ( strcmp(conshdlr->name, "integral") != 0 ) ) { assert(conshdlr->lastenforelaxresult != SCIP_CUTOFF); assert(conshdlr->lastenforelaxresult != SCIP_BRANCHED); assert(conshdlr->lastenforelaxresult != SCIP_REDUCEDDOM); assert(conshdlr->lastenforelaxresult != SCIP_DIDNOTRUN); /* if we already enforced the same relaxation solution at this node, we will only enforce new constraints in the * following; however, the result of the last call for the old constraint is still valid and we have to ensure * that an infeasibility in the last call is not lost because we only enforce new constraints */ if( conshdlr->lastenforelaxresult == SCIP_INFEASIBLE ) { *result = SCIP_INFEASIBLE; lastinfeasible = TRUE; } else lastinfeasible = FALSE; /* all constraints that were not yet enforced on the new relaxation solution must be useful constraints, which means, * that the new constraints are the last constraints of the useful ones */ nconss = conshdlr->nusefulenfoconss - conshdlr->lastnusefulenfoconss; nusefulconss = nconss; firstcons = conshdlr->lastnusefulenfoconss; relaxchanged = FALSE; } else { /* on a new relaxation solution or a new node, we want to enforce all constraints */ nconss = conshdlr->nenfoconss; nusefulconss = conshdlr->nusefulenfoconss; firstcons = 0; relaxchanged = TRUE; lastinfeasible = FALSE; } assert(firstcons >= 0); assert(firstcons + nconss <= conshdlr->nenfoconss); assert(nusefulconss <= nconss); /* constraint handlers without constraints should only be called once */ if( nconss > 0 || (!conshdlr->needscons && relaxchanged) ) { SCIP_CONS** conss; SCIP_Longint oldndomchgs; SCIP_Longint oldnprobdomchgs; int oldncuts; int oldnactiveconss; assert(conshdlr->consenforelax != NULL); SCIPdebugMessage("enforcing constraints %d to %d of %d constraints of handler <%s> (%s relaxation solution)\n", firstcons, firstcons + nconss - 1, conshdlr->nenfoconss, conshdlr->name, relaxchanged ? "new" : "old"); /* remember the number of processed constraints on the current relaxation solution */ conshdlr->lastenforelaxrelaxcount = stat->relaxcount; conshdlr->lastenforelaxdomchgcount = stat->domchgcount; conshdlr->lastenforelaxnode = stat->nnodes; conshdlr->lastnusefulenfoconss = conshdlr->nusefulenfoconss; /* get the array of the constraints to be processed */ conss = &(conshdlr->enfoconss[firstcons]); oldncuts = SCIPsepastoreGetNCuts(sepastore); oldnactiveconss = stat->nactiveconss; oldndomchgs = stat->nboundchgs + stat->nholechgs; oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs; /* check, if we want to use eager evaluation */ if( (conshdlr->eagerfreq == 0 && conshdlr->nenforelaxcalls == 0) || (conshdlr->eagerfreq > 0 && conshdlr->nenforelaxcalls % conshdlr->eagerfreq == 0) ) nusefulconss = nconss; /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->enforelaxtime, set); /* call external method */ SCIP_CALL( conshdlr->consenforelax(set->scip, relaxsol, conshdlr, conss, nconss, nusefulconss, solinfeasible, result) ); SCIPdebugMessage(" -> enforcing returned result <%d>\n", *result); /* stop timing */ SCIPclockStop(conshdlr->enforelaxtime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); /* update statistics */ conshdlr->nenforelaxcalls++; if( *result == SCIP_CUTOFF ) conshdlr->ncutoffs++; conshdlr->ncutsfound += SCIPsepastoreGetNCuts(sepastore) - oldncuts; /*lint !e776*/ conshdlr->nconssfound += MAX(stat->nactiveconss - oldnactiveconss, 0); /*lint !e776*/ if( *result != SCIP_BRANCHED ) { assert(tree->nchildren == 0); /* update domain reductions; therefore remove the domain * reduction counts which were generated in probing mode */ conshdlr->ndomredsfound += stat->nboundchgs + stat->nholechgs - oldndomchgs; conshdlr->ndomredsfound -= (stat->nprobboundchgs + stat->nprobholechgs - oldnprobdomchgs); } else conshdlr->nchildren += tree->nchildren; /* remember the result of the enforcement call */ conshdlr->lastenforelaxresult = *result; /* evaluate result */ if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_SEPARATED && *result != SCIP_BRANCHED && *result != SCIP_SOLVELP && *result != SCIP_INFEASIBLE && *result != SCIP_FEASIBLE ) { SCIPerrorMessage("enforcing method of constraint handler <%s> for relaxation solutions returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } /* if the same relaxation solution was already enforced at this node, we only enforced new constraints this time; * if the enforelax call returns feasible now, the solution is only feasible w.r.t. the new constraints, if the * last call detected infeasibility for the old constraints, we have to change the result to infeasible */ if( lastinfeasible && *result == SCIP_FEASIBLE ) *result = SCIP_INFEASIBLE; } return SCIP_OKAY; } /** calls enforcing method of constraint handler for LP solution for all constraints added after last * conshdlrResetEnfo() call */ SCIP_RETCODE SCIPconshdlrEnforceLPSol( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_TREE* tree, /**< branch and bound tree */ SCIP_SEPASTORE* sepastore, /**< separation storage */ SCIP_Bool solinfeasible, /**< was the solution already found out to be infeasible? */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(stat != NULL); assert(conshdlr->lastenfolplpcount != stat->lpcount || conshdlr->lastenfolpdomchgcount != stat->domchgcount || conshdlr->lastenfolpnode != stat->nnodes || (0 <= conshdlr->lastnusefulenfoconss && conshdlr->lastnusefulenfoconss <= conshdlr->nusefulenfoconss)); assert(set != NULL); assert(tree != NULL); assert(tree->nchildren == 0); assert(result != NULL); *result = SCIP_FEASIBLE; if( conshdlr->consenfolp != NULL ) { int nconss; int nusefulconss; int firstcons; SCIP_Bool lpchanged; SCIP_Bool lastinfeasible; /* check, if this LP solution was already enforced at this node */ if( conshdlr->lastenfolplpcount == stat->lpcount && conshdlr->lastenfolpdomchgcount == stat->domchgcount && conshdlr->lastenfolpnode == stat->nnodes && conshdlr->lastenfolpresult != SCIP_CONSADDED ) { assert(conshdlr->lastenfolpresult == SCIP_FEASIBLE || conshdlr->lastenfolpresult == SCIP_INFEASIBLE || conshdlr->lastenfolpresult == SCIP_SEPARATED ); /* if we already enforced the same pseudo solution at this node, we will only enforce new constraints in the * following; however, the result of the last call for the old constraint is still valid and we have to ensure * that an infeasibility in the last call is not lost because we only enforce new constraints */ if( conshdlr->lastenfolpresult == SCIP_FEASIBLE ) lastinfeasible = FALSE; else { assert(conshdlr->lastenfolpresult == SCIP_INFEASIBLE || conshdlr->lastenfolpresult == SCIP_SEPARATED); *result = SCIP_INFEASIBLE; lastinfeasible = TRUE; } /* all constraints that were not yet enforced on the new LP solution must be useful constraints, which means, * that the new constraints are the last constraints of the useful ones */ nconss = conshdlr->nusefulenfoconss - conshdlr->lastnusefulenfoconss; nusefulconss = nconss; firstcons = conshdlr->lastnusefulenfoconss; lpchanged = FALSE; } else { /* on a new LP solution or a new node, we want to enforce all constraints */ nconss = conshdlr->nenfoconss; nusefulconss = conshdlr->nusefulenfoconss; firstcons = 0; lpchanged = TRUE; lastinfeasible = FALSE; } assert(firstcons >= 0); assert(firstcons + nconss <= conshdlr->nenfoconss); assert(nusefulconss <= nconss); /* constraint handlers without constraints should only be called once */ if( nconss > 0 || (!conshdlr->needscons && lpchanged) ) { SCIP_CONS** conss; SCIP_Longint oldndomchgs; SCIP_Longint oldnprobdomchgs; int oldncuts; int oldnactiveconss; SCIPsetDebugMsg(set, "enforcing constraints %d to %d of %d constraints of handler <%s> (%s LP solution)\n", firstcons, firstcons + nconss - 1, conshdlr->nenfoconss, conshdlr->name, lpchanged ? "new" : "old"); /* remember the number of processed constraints on the current LP solution */ conshdlr->lastenfolplpcount = stat->lpcount; conshdlr->lastenfolpdomchgcount = stat->domchgcount; conshdlr->lastenfolpnode = stat->nnodes; conshdlr->lastnusefulenfoconss = conshdlr->nusefulenfoconss; /* get the array of the constraints to be processed */ conss = nconss > 0 ? conshdlr->enfoconss + firstcons : NULL; oldncuts = SCIPsepastoreGetNCuts(sepastore); oldnactiveconss = stat->nactiveconss; oldndomchgs = stat->nboundchgs + stat->nholechgs; oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs; /* check, if we want to use eager evaluation */ if( (conshdlr->eagerfreq == 0 && conshdlr->nenfolpcalls == 0) || (conshdlr->eagerfreq > 0 && conshdlr->nenfolpcalls % conshdlr->eagerfreq == 0) ) nusefulconss = nconss; /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->enfolptime, set); /* call external method */ SCIP_CALL( conshdlr->consenfolp(set->scip, conshdlr, conss, nconss, nusefulconss, solinfeasible, result) ); SCIPsetDebugMsg(set, " -> enforcing returned result <%d>\n", *result); /* stop timing */ SCIPclockStop(conshdlr->enfolptime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); /* remember the result of the enforcement call */ conshdlr->lastenfolpresult = *result; /* update statistics */ conshdlr->nenfolpcalls++; if( *result == SCIP_CUTOFF ) conshdlr->ncutoffs++; conshdlr->ncutsfound += SCIPsepastoreGetNCuts(sepastore) - oldncuts; /*lint !e776*/ conshdlr->nconssfound += MAX(stat->nactiveconss - oldnactiveconss, 0); /*lint !e776*/ if( *result != SCIP_BRANCHED ) { assert(tree->nchildren == 0); /* update domain reductions; therefore remove the domain * reduction counts which were generated in probing mode */ conshdlr->ndomredsfound += stat->nboundchgs + stat->nholechgs - oldndomchgs; conshdlr->ndomredsfound -= (stat->nprobboundchgs + stat->nprobholechgs - oldnprobdomchgs); } else conshdlr->nchildren += tree->nchildren; /* evaluate result */ if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_SEPARATED && *result != SCIP_SOLVELP && *result != SCIP_BRANCHED && *result != SCIP_INFEASIBLE && *result != SCIP_FEASIBLE ) { SCIPerrorMessage("enforcing method of constraint handler <%s> for LP solutions returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } /* if the same LP solution was already enforced at this node, we only enforced new constraints this time; * if the enfolp call returns feasible now, the solution is only feasible w.r.t. the new constraints, if the * last call detected infeasibility for the old constraints, we have to change the result to infeasible */ if( lastinfeasible && *result == SCIP_FEASIBLE ) *result = SCIP_INFEASIBLE; } } return SCIP_OKAY; } /** calls diving solution enforcement callback of constraint handler, if it exists */ SCIP_RETCODE SCIPconshdlrGetDiveBoundChanges( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set, /**< global SCIP settings */ SCIP_DIVESET* diveset, /**< diving settings to control scoring */ SCIP_SOL* sol, /**< current solution of diving mode */ SCIP_Bool* success, /**< pointer to store whether constraint handler successfully found a variable */ SCIP_Bool* infeasible /**< pointer to store whether the current node was detected to be infeasible */ ) { assert(conshdlr != NULL); assert(set != NULL); assert(diveset != NULL); assert(sol != NULL); assert(success != NULL); assert(infeasible != NULL); if( conshdlr->consgetdivebdchgs != NULL ) { SCIP_CALL( conshdlr->consgetdivebdchgs(set->scip, conshdlr, diveset, sol, success, infeasible) ); } return SCIP_OKAY; } /** calls enforcing method of constraint handler for pseudo solution for all constraints added after last * conshdlrResetEnfo() call */ SCIP_RETCODE SCIPconshdlrEnforcePseudoSol( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_TREE* tree, /**< branch and bound tree */ SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */ SCIP_Bool solinfeasible, /**< was the solution already found out to be infeasible? */ SCIP_Bool objinfeasible, /**< is the solution infeasible anyway due to violating lower objective bound? */ SCIP_Bool forced, /**< should enforcement of pseudo solution be forced? */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(stat != NULL); assert(conshdlr->lastenfopsdomchgcount != stat->domchgcount || conshdlr->lastenfopsnode != stat->nnodes || (0 <= conshdlr->lastnusefulenfoconss && conshdlr->lastnusefulenfoconss <= conshdlr->nusefulenfoconss)); assert(set != NULL); assert(tree != NULL); assert(tree->nchildren == 0); assert(result != NULL); /* no enforcing of pseudo solution */ if( set->cons_disableenfops && SCIPbranchcandGetNPseudoCands(branchcand) > 0 ) { *result = SCIP_INFEASIBLE; return SCIP_OKAY; } *result = SCIP_FEASIBLE; if( conshdlr->consenfops != NULL ) { int nconss; int nusefulconss; int firstcons; SCIP_Bool pschanged; SCIP_Bool lastinfeasible; /* check, if this pseudo solution was already enforced at this node */ if( !forced && conshdlr->lastenfopsdomchgcount == stat->domchgcount && conshdlr->lastenfopsnode == stat->nnodes && conshdlr->lastenfopsresult != SCIP_CONSADDED && conshdlr->lastenfopsresult != SCIP_SOLVELP ) { assert(conshdlr->lastenfopsresult != SCIP_CUTOFF); assert(conshdlr->lastenfopsresult != SCIP_BRANCHED); assert(conshdlr->lastenfopsresult != SCIP_REDUCEDDOM); assert(conshdlr->lastenfopsresult != SCIP_DIDNOTRUN || objinfeasible); /* if we already enforced the same pseudo solution at this node, we will only enforce new constraints in the * following; however, the result of the last call for the old constraint is still valid and we have to ensure * that an infeasibility in the last call is not lost because we only enforce new constraints */ if( conshdlr->lastenfopsresult == SCIP_INFEASIBLE ) { *result = SCIP_INFEASIBLE; lastinfeasible = TRUE; } else lastinfeasible = FALSE; /* all constraints that were not yet enforced on the new LP solution must be useful constraints, which means, * that the new constraints are the last constraints of the useful ones */ nconss = conshdlr->nusefulenfoconss - conshdlr->lastnusefulenfoconss; nusefulconss = nconss; firstcons = conshdlr->lastnusefulenfoconss; pschanged = FALSE; } else { /* on a new pseudo solution or a new node, we want to enforce all constraints */ nconss = conshdlr->nenfoconss; nusefulconss = conshdlr->nusefulenfoconss; firstcons = 0; pschanged = TRUE; lastinfeasible = FALSE; } assert(firstcons >= 0); assert(firstcons + nconss <= conshdlr->nenfoconss); assert(nusefulconss <= nconss); /* constraint handlers without constraints should only be called once */ if( nconss > 0 || (!conshdlr->needscons && pschanged) ) { SCIP_CONS** conss; SCIP_Longint oldndomchgs; SCIP_Longint oldnprobdomchgs; SCIPsetDebugMsg(set, "enforcing constraints %d to %d of %d constraints of handler <%s> (%s pseudo solution, objinfeasible=%u)\n", firstcons, firstcons + nconss - 1, conshdlr->nenfoconss, conshdlr->name, pschanged ? "new" : "old", objinfeasible); /* remember the number of processed constraints on the current pseudo solution */ conshdlr->lastenfopsdomchgcount = stat->domchgcount; conshdlr->lastenfopsnode = stat->nnodes; conshdlr->lastnusefulenfoconss = conshdlr->nusefulenfoconss; /* get the array of the constraints to be processed */ conss = &(conshdlr->enfoconss[firstcons]); oldndomchgs = stat->nboundchgs + stat->nholechgs; oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs; /* check, if we want to use eager evaluation */ if( (conshdlr->eagerfreq == 0 && conshdlr->nenfopscalls == 0) || (conshdlr->eagerfreq > 0 && conshdlr->nenfopscalls % conshdlr->eagerfreq == 0) ) nusefulconss = nconss; /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->enfopstime, set); /* call external method */ SCIP_CALL( conshdlr->consenfops(set->scip, conshdlr, conss, nconss, nusefulconss, solinfeasible, objinfeasible, result) ); SCIPsetDebugMsg(set, " -> enforcing returned result <%d>\n", *result); /* stop timing */ SCIPclockStop(conshdlr->enfopstime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); /* update statistics */ if( *result != SCIP_DIDNOTRUN ) conshdlr->nenfopscalls++; else if( !objinfeasible ) { SCIPerrorMessage("enforcing method of constraint handler <%s> for pseudo solutions was skipped, even though the solution was not objective-infeasible\n", conshdlr->name); conshdlr->lastenfopsresult = *result; return SCIP_INVALIDRESULT; } /* A constraint handler might return SCIP_DIDNOTRUN and not check any constraints in case objinfeasible was * TRUE; we change the result pointer to SCIP_INFEASIBLE in this case. */ else *result = SCIP_INFEASIBLE; if( *result == SCIP_CUTOFF ) conshdlr->ncutoffs++; if( *result != SCIP_BRANCHED ) { assert(tree->nchildren == 0); /* update domain reductions; therefore remove the domain * reduction counts which were generated in probing mode */ conshdlr->ndomredsfound += stat->nboundchgs + stat->nholechgs - oldndomchgs; conshdlr->ndomredsfound -= (stat->nprobboundchgs + stat->nprobholechgs - oldnprobdomchgs); } else conshdlr->nchildren += tree->nchildren; /* remember the result of the enforcement call */ conshdlr->lastenfopsresult = *result; /* evaluate result */ if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_BRANCHED && *result != SCIP_SOLVELP && *result != SCIP_INFEASIBLE && *result != SCIP_FEASIBLE && *result != SCIP_DIDNOTRUN ) { SCIPerrorMessage("enforcing method of constraint handler <%s> for pseudo solutions returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } /* if the same pseudo solution was already enforced at this node, we only enforced new constraints this time; * if the enfops call returns feasible now, the solution is only feasible w.r.t. the new constraints, if the * last call detected infeasibility for the old constraints, we have to change the result to infeasible */ if( lastinfeasible && *result == SCIP_FEASIBLE ) *result = SCIP_INFEASIBLE; } else if( objinfeasible ) { /* * Even if nothing is enforced, the solution might still be infeasible due to violating lower bound. * Make sure the result is updated in this case as well. */ *result = SCIP_INFEASIBLE; } } return SCIP_OKAY; } /** calls feasibility check method of constraint handler */ SCIP_RETCODE SCIPconshdlrCheck( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_SOL* sol, /**< primal CIP solution */ SCIP_Bool checkintegrality, /**< Has integrality to be checked? */ SCIP_Bool checklprows, /**< Do constraints represented by rows in the current LP have to be checked? */ SCIP_Bool printreason, /**< Should the reason for the violation be printed? */ SCIP_Bool completely, /**< Should all violations be checked? */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(set != NULL); assert(result != NULL); *result = SCIP_FEASIBLE; if( conshdlr->conscheck != NULL && (!conshdlr->needscons || conshdlr->ncheckconss > 0) ) { SCIPsetDebugMsg(set, "checking %d constraints of handler <%s>\n", conshdlr->ncheckconss, conshdlr->name); /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->checktime, set); /* call external method */ SCIP_CALL( conshdlr->conscheck(set->scip, conshdlr, conshdlr->checkconss, conshdlr->ncheckconss, sol, checkintegrality, checklprows, printreason, completely, result) ); SCIPsetDebugMsg(set, " -> checking returned result <%d>\n", *result); /* stop timing */ SCIPclockStop(conshdlr->checktime, set); /* update statistics */ conshdlr->ncheckcalls++; /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); /* evaluate result */ if( *result != SCIP_INFEASIBLE && *result != SCIP_FEASIBLE ) { SCIPerrorMessage("feasibility check of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } } return SCIP_OKAY; } /** calls propagation method of constraint handler */ SCIP_RETCODE SCIPconshdlrPropagate( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ int depth, /**< depth of current node */ SCIP_Bool fullpropagation, /**< should all constraints be propagated (or only new ones)? */ SCIP_Bool execdelayed, /**< execute propagation method even if it is marked to be delayed */ SCIP_Bool instrongbranching, /**< are we currently doing strong branching? */ SCIP_PROPTIMING proptiming, /**< current point in the node solving process */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(stat != NULL); assert(conshdlr->lastpropdomchgcount != stat->domchgcount || (0 <= conshdlr->lastnusefulpropconss && conshdlr->lastnusefulpropconss <= conshdlr->nusefulpropconss)); assert(set != NULL); assert(depth >= 0); assert(result != NULL); *result = SCIP_DIDNOTRUN; if( conshdlr->consprop != NULL && (!conshdlr->needscons || conshdlr->npropconss > 0) && ((depth == 0 && conshdlr->propfreq == 0) || (conshdlr->propfreq > 0 && depth % conshdlr->propfreq == 0) || conshdlr->propwasdelayed) ) { /* check, if propagation method should be delayed */ if( !conshdlr->delayprop || execdelayed ) { int nconss; int nusefulconss; int nmarkedpropconss; int firstcons; /* check, if the current domains were already propagated */ if( !fullpropagation && conshdlr->lastpropdomchgcount == stat->domchgcount && conshdlr->nmarkedpropconss == 0 ) { /* all constraints that were not yet propagated on the new domains must be useful constraints, which means, * that the new constraints are the last constraints of the useful ones */ nconss = conshdlr->nusefulpropconss - conshdlr->lastnusefulpropconss; nusefulconss = nconss; firstcons = conshdlr->lastnusefulpropconss; } else { /* on new domains, we want to propagate all constraints */ nconss = conshdlr->npropconss; nusefulconss = conshdlr->nusefulpropconss; firstcons = 0; } assert(firstcons >= 0); assert(firstcons + nconss <= conshdlr->npropconss); assert(nusefulconss <= nconss); nmarkedpropconss = conshdlr->nmarkedpropconss; /* constraint handlers without constraints should only be called once */ if( nconss > 0 || fullpropagation || (!conshdlr->needscons && conshdlr->lastpropdomchgcount != stat->domchgcount) ) { SCIP_CONS** conss; SCIP_Longint oldndomchgs; SCIP_Longint oldnprobdomchgs; SCIP_Longint lastpropdomchgcount; int lastnusefulpropconss; SCIPsetDebugMsg(set, "propagating constraints %d to %d of %d constraints of handler <%s> (%s pseudo solution, %d useful)\n", firstcons, firstcons + nconss - 1, conshdlr->npropconss, conshdlr->name, !fullpropagation && conshdlr->lastpropdomchgcount == stat->domchgcount ? "old" : "new", nusefulconss); /* remember the number of processed constraints on the current domains */ lastpropdomchgcount = stat->domchgcount; lastnusefulpropconss = conshdlr->nusefulpropconss; /* get the array of the constraints to be processed */ conss = nconss > 0 ? (conshdlr->propconss + firstcons) : NULL; oldndomchgs = stat->nboundchgs + stat->nholechgs; oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs; /* check, if we want to use eager evaluation */ if( (conshdlr->eagerfreq == 0 && conshdlr->npropcalls == 0) || (conshdlr->eagerfreq > 0 && conshdlr->npropcalls % conshdlr->eagerfreq == 0) ) nusefulconss = nconss; /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); conshdlr->duringprop = TRUE; /* start timing */ if( instrongbranching ) SCIPclockStart(conshdlr->sbproptime, set); else SCIPclockStart(conshdlr->proptime, set); assert(nusefulconss <= nconss); assert(nmarkedpropconss <= nconss); /* call external method */ SCIP_CALL( conshdlr->consprop(set->scip, conshdlr, conss, nconss, nusefulconss, nmarkedpropconss, proptiming, result) ); SCIPsetDebugMsg(set, " -> propagation returned result <%d>\n", *result); /* stop timing */ if( instrongbranching ) SCIPclockStop(conshdlr->sbproptime, set); else SCIPclockStop(conshdlr->proptime, set); /* perform the cached constraint updates */ conshdlr->duringprop = FALSE; SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); /* update statistics */ if( *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED ) { conshdlr->lastpropdomchgcount = lastpropdomchgcount; conshdlr->lastnusefulpropconss = MIN(conshdlr->nusefulpropconss, lastnusefulpropconss); conshdlr->npropcalls++; } else { assert(lastpropdomchgcount == stat->domchgcount); assert(lastnusefulpropconss == conshdlr->nusefulpropconss); } if( *result == SCIP_CUTOFF ) conshdlr->ncutoffs++; /* update domain reductions; therefore remove the domain * reduction counts which were generated in probing mode */ conshdlr->ndomredsfound += stat->nboundchgs + stat->nholechgs - oldndomchgs; conshdlr->ndomredsfound -= (stat->nprobboundchgs + stat->nprobholechgs - oldnprobdomchgs); /* check result code of callback method */ if( *result != SCIP_CUTOFF && *result != SCIP_REDUCEDDOM && *result != SCIP_DIDNOTFIND && *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED && *result != SCIP_DELAYNODE ) { SCIPerrorMessage("propagation method of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } } } else { SCIPsetDebugMsg(set, "propagation method of constraint handler <%s> was delayed\n", conshdlr->name); *result = SCIP_DELAYED; } /* remember whether propagation method was delayed */ conshdlr->propwasdelayed = (*result == SCIP_DELAYED); } return SCIP_OKAY; } /** calls presolving method of constraint handler */ SCIP_RETCODE SCIPconshdlrPresolve( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_PRESOLTIMING timing, /**< current presolving timing */ int nrounds, /**< number of presolving rounds already done */ int* nfixedvars, /**< pointer to total number of variables fixed of all presolvers */ int* naggrvars, /**< pointer to total number of variables aggregated of all presolvers */ int* nchgvartypes, /**< pointer to total number of variable type changes of all presolvers */ int* nchgbds, /**< pointer to total number of variable bounds tightened of all presolvers */ int* naddholes, /**< pointer to total number of domain holes added of all presolvers */ int* ndelconss, /**< pointer to total number of deleted constraints of all presolvers */ int* naddconss, /**< pointer to total number of added constraints of all presolvers */ int* nupgdconss, /**< pointer to total number of upgraded constraints of all presolvers */ int* nchgcoefs, /**< pointer to total number of changed coefficients of all presolvers */ int* nchgsides, /**< pointer to total number of changed left/right hand sides of all presolvers */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { assert(conshdlr != NULL); assert(conshdlr->nusefulsepaconss <= conshdlr->nsepaconss); assert(conshdlr->nusefulenfoconss <= conshdlr->nenfoconss); assert(conshdlr->nusefulcheckconss <= conshdlr->ncheckconss); assert(conshdlr->nusefulpropconss <= conshdlr->npropconss); assert(set != NULL); assert(nfixedvars != NULL); assert(naggrvars != NULL); assert(nchgvartypes != NULL); assert(nchgbds != NULL); assert(naddholes != NULL); assert(ndelconss != NULL); assert(naddconss != NULL); assert(nupgdconss != NULL); assert(nchgcoefs != NULL); assert(nchgsides != NULL); assert(result != NULL); *result = SCIP_DIDNOTRUN; if( conshdlr->conspresol != NULL && (!conshdlr->needscons || conshdlr->nactiveconss > 0) && (conshdlr->maxprerounds == -1 || conshdlr->npresolcalls < conshdlr->maxprerounds ) ) { SCIPsetDebugMsg(set, "presolving %d constraints of handler <%s>\n", conshdlr->nactiveconss, conshdlr->name); /* check, if presolving method should be executed for the current timing */ if( timing & conshdlr->presoltiming ) { int nnewfixedvars; int nnewaggrvars; int nnewchgvartypes; int nnewchgbds; int nnewholes; int nnewdelconss; int nnewaddconss; int nnewupgdconss; int nnewchgcoefs; int nnewchgsides; /* calculate the number of changes since last call */ nnewfixedvars = *nfixedvars - conshdlr->lastnfixedvars; nnewaggrvars = *naggrvars - conshdlr->lastnaggrvars; nnewchgvartypes = *nchgvartypes - conshdlr->lastnchgvartypes; nnewchgbds = *nchgbds - conshdlr->lastnchgbds; nnewholes = *naddholes - conshdlr->lastnaddholes; nnewdelconss = *ndelconss - conshdlr->lastndelconss; nnewaddconss = *naddconss - conshdlr->lastnaddconss; nnewupgdconss = *nupgdconss - conshdlr->lastnupgdconss; nnewchgcoefs = *nchgcoefs - conshdlr->lastnchgcoefs; nnewchgsides = *nchgsides - conshdlr->lastnchgsides; /* remember the old number of changes */ conshdlr->lastnfixedvars = *nfixedvars; conshdlr->lastnaggrvars = *naggrvars; conshdlr->lastnchgvartypes = *nchgvartypes; conshdlr->lastnchgbds = *nchgbds; conshdlr->lastnaddholes = *naddholes; conshdlr->lastndelconss = *ndelconss; conshdlr->lastnaddconss = *naddconss; conshdlr->lastnupgdconss = *nupgdconss; conshdlr->lastnchgcoefs = *nchgcoefs; conshdlr->lastnchgsides = *nchgsides; /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* start timing */ SCIPclockStart(conshdlr->presoltime, set); /* call external method */ SCIP_CALL( conshdlr->conspresol(set->scip, conshdlr, conshdlr->conss, conshdlr->nactiveconss, nrounds, timing, nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, nfixedvars, naggrvars, nchgvartypes, nchgbds, naddholes, ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides, result) ); /* stop timing */ SCIPclockStop(conshdlr->presoltime, set); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); /* count the new changes */ conshdlr->nfixedvars += *nfixedvars - conshdlr->lastnfixedvars; conshdlr->naggrvars += *naggrvars - conshdlr->lastnaggrvars; conshdlr->nchgvartypes += *nchgvartypes - conshdlr->lastnchgvartypes; conshdlr->nchgbds += *nchgbds - conshdlr->lastnchgbds; conshdlr->naddholes += *naddholes - conshdlr->lastnaddholes; conshdlr->ndelconss += *ndelconss - conshdlr->lastndelconss; conshdlr->naddconss += *naddconss - conshdlr->lastnaddconss; conshdlr->nupgdconss += *nupgdconss - conshdlr->lastnupgdconss; conshdlr->nchgcoefs += *nchgcoefs - conshdlr->lastnchgcoefs; conshdlr->nchgsides += *nchgsides - conshdlr->lastnchgsides; /* check result code of callback method */ if( *result != SCIP_CUTOFF && *result != SCIP_UNBOUNDED && *result != SCIP_SUCCESS && *result != SCIP_DIDNOTFIND && *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED ) { SCIPerrorMessage("presolving method of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } /* increase the number of calls, if the presolving method tried to find reductions */ if( *result != SCIP_DIDNOTRUN ) ++(conshdlr->npresolcalls); } SCIPsetDebugMsg(set, "after presolving %d constraints left of handler <%s>\n", conshdlr->nactiveconss, conshdlr->name); } return SCIP_OKAY; } /** calls variable deletion method of constraint handler */ SCIP_RETCODE SCIPconshdlrDelVars( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { assert(conshdlr != NULL); assert(set != NULL); if( conshdlr->consdelvars != NULL ) { SCIPsetDebugMsg(set, "deleting variables in constraints of handler <%s>\n", conshdlr->name); /* during constraint processing, constraints of this handler may be deleted, activated, deactivated, * enabled, disabled, marked obsolete or useful, which would change the conss array given to the * external method; to avoid this, these changes will be buffered and processed after the method call */ conshdlrDelayUpdates(conshdlr); /* call external method */ SCIP_CALL( conshdlr->consdelvars(set->scip, conshdlr, conshdlr->conss, conshdlr->nconss) ); /* perform the cached constraint updates */ SCIP_CALL( conshdlrForceUpdates(conshdlr, blkmem, set, stat) ); } return SCIP_OKAY; } /** locks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */ SCIP_RETCODE SCIPconshdlrLockVars( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set /**< global SCIP settings */ ) { assert(conshdlr != NULL); assert(conshdlr->conslock != NULL); assert(!conshdlr->needscons); SCIP_CALL( conshdlr->conslock(set->scip, conshdlr, NULL, SCIP_LOCKTYPE_MODEL, +1, 0) ); return SCIP_OKAY; } /** unlocks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */ SCIP_RETCODE SCIPconshdlrUnlockVars( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_SET* set /**< global SCIP settings */ ) { assert(conshdlr != NULL); assert(conshdlr->conslock != NULL); assert(!conshdlr->needscons); SCIP_CALL( conshdlr->conslock(set->scip, conshdlr, NULL, SCIP_LOCKTYPE_MODEL, -1, 0) ); return SCIP_OKAY; } /** gets name of constraint handler */ const char* SCIPconshdlrGetName( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->name; } /** gets description of constraint handler */ const char* SCIPconshdlrGetDesc( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->desc; } /** gets user data of constraint handler */ SCIP_CONSHDLRDATA* SCIPconshdlrGetData( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->conshdlrdata; } /** sets user data of constraint handler; user has to free old data in advance! */ void SCIPconshdlrSetData( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_CONSHDLRDATA* conshdlrdata /**< new constraint handler user data */ ) { assert(conshdlr != NULL); conshdlr->conshdlrdata = conshdlrdata; } /** sets all separation related callbacks of the constraint handler */ void SCIPconshdlrSetSepa( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSSEPALP ((*conssepalp)), /**< separate cutting planes for LP solution */ SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */ int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */ int sepapriority, /**< priority of the constraint handler for separation */ SCIP_Bool delaysepa /**< should separation method be delayed, if other separators found cuts? */ ) { assert(conshdlr != NULL); assert(conssepalp != NULL || conssepasol != NULL || sepafreq == -1); conshdlr->conssepalp = conssepalp; conshdlr->conssepasol = conssepasol; conshdlr->sepafreq = sepafreq; conshdlr->sepapriority = sepapriority; conshdlr->delaysepa = delaysepa; } /** sets both the propagation callback and the propagation frequency of the constraint handler */ void SCIPconshdlrSetProp( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSPROP ((*consprop)), /**< propagate variable domains */ int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */ SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */ SCIP_PROPTIMING timingmask /**< positions in the node solving loop where propagators should be executed */ ) { assert(conshdlr != NULL); assert(consprop != NULL || propfreq == -1); conshdlr->consprop = consprop; conshdlr->propfreq = propfreq; conshdlr->delayprop = delayprop; conshdlr->proptiming = timingmask; } /** sets copy method of both the constraint handler and each associated constraint */ void SCIPconshdlrSetEnforelax( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSENFORELAX ((*consenforelax)) /**< constraint copying method */ ) { assert(conshdlr != NULL); conshdlr->consenforelax = consenforelax; } /** sets copy method of both the constraint handler and each associated constraint */ void SCIPconshdlrSetCopy( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */ SCIP_DECL_CONSCOPY ((*conscopy)) /**< constraint copying method */ ) { assert(conshdlr != NULL); assert(!conshdlr->needscons || (conshdlrcopy == NULL) == (conscopy == NULL)); conshdlr->conshdlrcopy = conshdlrcopy; conshdlr->conscopy = conscopy; } /** sets destructor method of constraint handler */ void SCIPconshdlrSetFree( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSFREE ((*consfree)) /**< destructor of constraint handler */ ) { assert(conshdlr != NULL); conshdlr->consfree = consfree; } /** sets initialization method of constraint handler */ void SCIPconshdlrSetInit( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSINIT ((*consinit)) /**< initialize constraint handler */ ) { assert(conshdlr != NULL); conshdlr->consinit = consinit; } /** sets deinitialization method of constraint handler */ void SCIPconshdlrSetExit( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSEXIT ((*consexit)) /**< deinitialize constraint handler */ ) { assert(conshdlr != NULL); conshdlr->consexit = consexit; } /** sets solving process initialization method of constraint handler */ void SCIPconshdlrSetInitsol( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSINITSOL((*consinitsol)) /**< solving process initialization method of constraint handler */ ) { assert(conshdlr != NULL); conshdlr->consinitsol = consinitsol; } /** sets solving process deinitialization method of constraint handler */ void SCIPconshdlrSetExitsol( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSEXITSOL ((*consexitsol)) /**< solving process deinitialization method of constraint handler */ ) { assert(conshdlr != NULL); conshdlr->consexitsol = consexitsol; } /** sets preprocessing initialization method of constraint handler */ void SCIPconshdlrSetInitpre( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSINITPRE((*consinitpre)) /**< preprocessing initialization method of constraint handler */ ) { assert(conshdlr != NULL); conshdlr->consinitpre = consinitpre; } /** sets preprocessing deinitialization method of constraint handler */ void SCIPconshdlrSetExitpre( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSEXITPRE((*consexitpre)) /**< preprocessing deinitialization method of constraint handler */ ) { assert(conshdlr != NULL); conshdlr->consexitpre = consexitpre; } /** sets presolving method of constraint handler */ SCIP_RETCODE SCIPconshdlrSetPresol( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSPRESOL ((*conspresol)), /**< presolving method of constraint handler */ int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */ SCIP_PRESOLTIMING presoltiming /**< timing mask of the constraint handler's presolving method */ ) { assert(conshdlr != NULL); conshdlr->conspresol = conspresol; conshdlr->maxprerounds = maxprerounds; /* the interface change from delay flags to timings cannot be recognized at compile time: Exit with an appropriate * error message */ if( presoltiming < SCIP_PRESOLTIMING_FAST || presoltiming > SCIP_PRESOLTIMING_MAX ) { SCIPmessagePrintError("ERROR: 'PRESOLDELAY'-flag no longer available since SCIP 3.2, use an appropriate " "'SCIP_PRESOLTIMING' for <%s> constraint handler instead.\n", conshdlr->name); return SCIP_PARAMETERWRONGVAL; } conshdlr->presoltiming = presoltiming; return SCIP_OKAY; } /** sets method of constraint handler to free specific constraint data */ void SCIPconshdlrSetDelete( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSDELETE ((*consdelete)) /**< free specific constraint data */ ) { assert(conshdlr != NULL); conshdlr->consdelete = consdelete; } /** sets method of constraint handler to transform constraint data into data belonging to the transformed problem */ void SCIPconshdlrSetTrans( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSTRANS ((*constrans)) /**< transform constraint data into data belonging to the transformed problem */ ) { assert(conshdlr != NULL); conshdlr->constrans = constrans; } /** sets method of constraint handler to initialize LP with relaxations of "initial" constraints */ void SCIPconshdlrSetInitlp( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSINITLP ((*consinitlp)) /**< initialize LP with relaxations of "initial" constraints */ ) { assert(conshdlr != NULL); conshdlr->consinitlp = consinitlp; } /** sets propagation conflict resolving method of constraint handler */ void SCIPconshdlrSetResprop( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSRESPROP ((*consresprop)) /**< propagation conflict resolving method */ ) { assert(conshdlr != NULL); conshdlr->consresprop = consresprop; } /** sets activation notification method of constraint handler */ void SCIPconshdlrSetActive( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSACTIVE ((*consactive)) /**< activation notification method */ ) { assert(conshdlr != NULL); conshdlr->consactive = consactive; } /** sets deactivation notification method of constraint handler */ void SCIPconshdlrSetDeactive( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSDEACTIVE((*consdeactive)) /**< deactivation notification method */ ) { assert(conshdlr != NULL); conshdlr->consdeactive = consdeactive; } /** sets enabling notification method of constraint handler */ void SCIPconshdlrSetEnable( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSENABLE ((*consenable)) /**< enabling notification method */ ) { assert(conshdlr != NULL); conshdlr->consenable = consenable; } /** sets disabling notification method of constraint handler */ void SCIPconshdlrSetDisable( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSDISABLE ((*consdisable)) /**< disabling notification method */ ) { assert(conshdlr != NULL); conshdlr->consdisable = consdisable; } /** sets variable deletion method of constraint handler */ void SCIPconshdlrSetDelvars( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSDELVARS ((*consdelvars)) /**< variable deletion method */ ) { assert(conshdlr != NULL); conshdlr->consdelvars = consdelvars; } /** sets constraint display method of constraint handler */ void SCIPconshdlrSetPrint( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSPRINT ((*consprint)) /**< constraint display method */ ) { assert(conshdlr != NULL); conshdlr->consprint = consprint; } /** sets constraint parsing method of constraint handler */ void SCIPconshdlrSetParse( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSPARSE ((*consparse)) /**< constraint parsing method */ ) { assert(conshdlr != NULL); conshdlr->consparse = consparse; } /** sets constraint variable getter method of constraint handler */ void SCIPconshdlrSetGetVars( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSGETVARS ((*consgetvars)) /**< constraint variable getter method */ ) { assert(conshdlr != NULL); conshdlr->consgetvars = consgetvars; } /** sets constraint variable number getter method of constraint handler */ void SCIPconshdlrSetGetNVars( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSGETNVARS((*consgetnvars)) /**< constraint variable number getter method */ ) { assert(conshdlr != NULL); conshdlr->consgetnvars = consgetnvars; } /** sets diving enforcement method of constraint handler */ void SCIPconshdlrSetGetDiveBdChgs( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)) /**< constraint handler diving solution enforcement method */ ) { assert(conshdlr != NULL); conshdlr->consgetdivebdchgs = consgetdivebdchgs; } /** gets array with constraints of constraint handler; the first SCIPconshdlrGetNActiveConss() entries are the active * constraints, the last SCIPconshdlrGetNConss() - SCIPconshdlrGetNActiveConss() constraints are deactivated * * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local * flag is TRUE) and the current node belongs to the corresponding sub tree. */ SCIP_CONS** SCIPconshdlrGetConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->conss; } /** gets array with enforced constraints of constraint handler; this is local information */ SCIP_CONS** SCIPconshdlrGetEnfoConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->enfoconss; } /** gets array with checked constraints of constraint handler; this is local information */ SCIP_CONS** SCIPconshdlrGetCheckConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->checkconss; } /** gets array with delayed update constraints * * @attention Usually, there should be no need to access this array. Use this only if you are absolutely sure what you are doing. */ SCIP_CONS** SCIPconshdlrGetUpdateConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->updateconss; } /** gets total number of existing transformed constraints of constraint handler */ int SCIPconshdlrGetNConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nconss; } /** gets number of enforced constraints of constraint handler; this is local information */ int SCIPconshdlrGetNEnfoConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nenfoconss; } /** gets number of checked constraints of constraint handler; this is local information */ int SCIPconshdlrGetNCheckConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->ncheckconss; } /** gets number of active constraints of constraint handler * * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local * flag is TRUE) and the current node belongs to the corresponding sub tree. */ int SCIPconshdlrGetNActiveConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nactiveconss; } /** gets number of enabled constraints of constraint handler */ int SCIPconshdlrGetNEnabledConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nenabledconss; } /** gets number of constraints that have delayed updates */ int SCIPconshdlrGetNUpdateConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nupdateconss; } /** enables or disables all clocks of \p conshdlr, depending on the value of the flag */ void SCIPconshdlrEnableOrDisableClocks( SCIP_CONSHDLR* conshdlr, /**< the constraint handler for which all clocks should be enabled or disabled */ SCIP_Bool enable /**< should the clocks of the constraint handler be enabled? */ ) { assert(conshdlr != NULL); SCIPclockEnableOrDisable(conshdlr->setuptime, enable); SCIPclockEnableOrDisable(conshdlr->checktime, enable); SCIPclockEnableOrDisable(conshdlr->enfolptime, enable); SCIPclockEnableOrDisable(conshdlr->enfopstime, enable); SCIPclockEnableOrDisable(conshdlr->enforelaxtime, enable); SCIPclockEnableOrDisable(conshdlr->presoltime, enable); SCIPclockEnableOrDisable(conshdlr->proptime, enable); SCIPclockEnableOrDisable(conshdlr->resproptime, enable); SCIPclockEnableOrDisable(conshdlr->sbproptime, enable); SCIPclockEnableOrDisable(conshdlr->sepatime, enable); } /** gets time in seconds used for setting up this constraint handler for new stages */ SCIP_Real SCIPconshdlrGetSetupTime( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return SCIPclockGetTime(conshdlr->setuptime); } /** gets time in seconds used for presolving in this constraint handler */ SCIP_Real SCIPconshdlrGetPresolTime( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return SCIPclockGetTime(conshdlr->presoltime); } /** gets time in seconds used for separation in this constraint handler */ SCIP_Real SCIPconshdlrGetSepaTime( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return SCIPclockGetTime(conshdlr->sepatime); } /** gets time in seconds used for LP enforcement in this constraint handler */ SCIP_Real SCIPconshdlrGetEnfoLPTime( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return SCIPclockGetTime(conshdlr->enfolptime); } /** gets time in seconds used for pseudo enforcement in this constraint handler */ SCIP_Real SCIPconshdlrGetEnfoPSTime( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return SCIPclockGetTime(conshdlr->enfopstime); } /** gets time in seconds used for relaxation enforcement in this constraint handler */ SCIP_Real SCIPconshdlrGetEnfoRelaxTime( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return SCIPclockGetTime(conshdlr->enforelaxtime); } /** gets time in seconds used for propagation in this constraint handler */ SCIP_Real SCIPconshdlrGetPropTime( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return SCIPclockGetTime(conshdlr->proptime); } /** gets time in seconds used for propagation in this constraint handler during strong branching */ SCIP_Real SCIPconshdlrGetStrongBranchPropTime( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return SCIPclockGetTime(conshdlr->sbproptime); } /** gets time in seconds used for feasibility checking in this constraint handler */ SCIP_Real SCIPconshdlrGetCheckTime( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return SCIPclockGetTime(conshdlr->checktime); } /** gets time in seconds used for resolving propagation in this constraint handler */ SCIP_Real SCIPconshdlrGetRespropTime( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return SCIPclockGetTime(conshdlr->resproptime); } /** gets number of calls to the constraint handler's separation method */ SCIP_Longint SCIPconshdlrGetNSepaCalls( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nsepacalls; } /** gets number of calls to the constraint handler's LP enforcing method */ SCIP_Longint SCIPconshdlrGetNEnfoLPCalls( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nenfolpcalls; } /** gets number of calls to the constraint handler's pseudo enforcing method */ SCIP_Longint SCIPconshdlrGetNEnfoPSCalls( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nenfopscalls; } /** gets number of calls to the constraint handler's relaxation enforcing method */ SCIP_Longint SCIPconshdlrGetNEnfoRelaxCalls( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nenforelaxcalls; } /** gets number of calls to the constraint handler's propagation method */ SCIP_Longint SCIPconshdlrGetNPropCalls( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->npropcalls; } /** gets number of calls to the constraint handler's checking method */ SCIP_Longint SCIPconshdlrGetNCheckCalls( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->ncheckcalls; } /** gets number of calls to the constraint handler's resolve propagation method */ SCIP_Longint SCIPconshdlrGetNRespropCalls( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nrespropcalls; } /** gets total number of times, this constraint handler detected a cutoff */ SCIP_Longint SCIPconshdlrGetNCutoffs( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->ncutoffs; } /** gets total number of cuts found by this constraint handler */ SCIP_Longint SCIPconshdlrGetNCutsFound( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->ncutsfound; } /** gets total number of cuts found by this constraint handler applied to lp */ SCIP_Longint SCIPconshdlrGetNCutsApplied( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->ncutsapplied; } /** increase count of applied cuts */ void SCIPconshdlrIncNAppliedCuts( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); ++conshdlr->ncutsapplied; } /** increase count of found cuts */ void SCIPconshdlrIncNCutsFound( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); ++conshdlr->ncutsfound; } /** gets total number of additional constraints added by this constraint handler */ SCIP_Longint SCIPconshdlrGetNConssFound( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nconssfound; } /** gets total number of domain reductions found by this constraint handler */ SCIP_Longint SCIPconshdlrGetNDomredsFound( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->ndomredsfound; } /** gets number of children created by this constraint handler */ SCIP_Longint SCIPconshdlrGetNChildren( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nchildren; } /** gets maximum number of active constraints of constraint handler existing at the same time */ int SCIPconshdlrGetMaxNActiveConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->maxnactiveconss; } /** gets initial number of active constraints of constraint handler */ int SCIPconshdlrGetStartNActiveConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->startnactiveconss; } /** gets number of variables fixed in presolving method of constraint handler */ int SCIPconshdlrGetNFixedVars( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nfixedvars; } /** gets number of variables aggregated in presolving method of constraint handler */ int SCIPconshdlrGetNAggrVars( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->naggrvars; } /** gets number of variable types changed in presolving method of constraint handler */ int SCIPconshdlrGetNChgVarTypes( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nchgvartypes; } /** gets number of bounds changed in presolving method of constraint handler */ int SCIPconshdlrGetNChgBds( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nchgbds; } /** gets number of holes added to domains of variables in presolving method of constraint handler */ int SCIPconshdlrGetNAddHoles( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->naddholes; } /** gets number of constraints deleted in presolving method of constraint handler */ int SCIPconshdlrGetNDelConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->ndelconss; } /** gets number of constraints added in presolving method of constraint handler */ int SCIPconshdlrGetNAddConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->naddconss; } /** gets number of constraints upgraded in presolving method of constraint handler */ int SCIPconshdlrGetNUpgdConss( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nupgdconss; } /** gets number of coefficients changed in presolving method of constraint handler */ int SCIPconshdlrGetNChgCoefs( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nchgcoefs; } /** gets number of constraint sides changed in presolving method of constraint handler */ int SCIPconshdlrGetNChgSides( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->nchgsides; } /** gets number of times the presolving method of the constraint handler was called and tried to find reductions */ int SCIPconshdlrGetNPresolCalls( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->npresolcalls; } /** gets separation priority of constraint handler */ int SCIPconshdlrGetSepaPriority( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->sepapriority; } /** gets enforcing priority of constraint handler */ int SCIPconshdlrGetEnfoPriority( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->enfopriority; } /** gets checking priority of constraint handler */ int SCIPconshdlrGetCheckPriority( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->checkpriority; } /** gets separation frequency of constraint handler */ int SCIPconshdlrGetSepaFreq( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->sepafreq; } /** gets propagation frequency of constraint handler */ int SCIPconshdlrGetPropFreq( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->propfreq; } /** gets frequency of constraint handler for eager evaluations in separation, propagation and enforcement */ int SCIPconshdlrGetEagerFreq( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->eagerfreq; } /** needs constraint handler a constraint to be called? */ SCIP_Bool SCIPconshdlrNeedsCons( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->needscons; } /** does the constraint handler perform presolving? */ SCIP_Bool SCIPconshdlrDoesPresolve( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return (conshdlr->conspresol != NULL); } /** should separation method be delayed, if other separators found cuts? */ SCIP_Bool SCIPconshdlrIsSeparationDelayed( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->delaysepa; } /** should propagation method be delayed, if other propagators found reductions? */ SCIP_Bool SCIPconshdlrIsPropagationDelayed( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->delayprop; } /** was LP separation method delayed at the last call? */ SCIP_Bool SCIPconshdlrWasLPSeparationDelayed( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->sepalpwasdelayed; } /** was primal solution separation method delayed at the last call? */ SCIP_Bool SCIPconshdlrWasSolSeparationDelayed( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->sepasolwasdelayed; } /** was propagation method delayed at the last call? */ SCIP_Bool SCIPconshdlrWasPropagationDelayed( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->propwasdelayed; } /** is constraint handler initialized? */ SCIP_Bool SCIPconshdlrIsInitialized( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->initialized; } /** does the constraint handler have a copy function? */ SCIP_Bool SCIPconshdlrIsClonable( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return (conshdlr->conshdlrcopy != NULL); } /** returns the timing mask of the propagation method of the constraint handler */ SCIP_PROPTIMING SCIPconshdlrGetPropTiming( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->proptiming; } /** sets the timing mask of the propagation method of the constraint handler */ void SCIPconshdlrSetPropTiming( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_PROPTIMING proptiming /**< timing mask to be set */ ) { assert(conshdlr != NULL); conshdlr->proptiming = proptiming; } /** returns the timing mask of the presolving method of the constraint handler */ SCIP_PRESOLTIMING SCIPconshdlrGetPresolTiming( SCIP_CONSHDLR* conshdlr /**< constraint handler */ ) { assert(conshdlr != NULL); return conshdlr->presoltiming; } /** sets the timing mask of the presolving method of the constraint handler */ void SCIPconshdlrSetPresolTiming( SCIP_CONSHDLR* conshdlr, /**< constraint handler */ SCIP_PRESOLTIMING presoltiming /** timing mask to be set */ ) { assert(conshdlr != NULL); conshdlr->presoltiming = presoltiming; } /* * Constraint set change methods */ /** creates empty constraint set change data */ static SCIP_RETCODE conssetchgCreate( SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change data */ BMS_BLKMEM* blkmem /**< block memory */ ) { assert(conssetchg != NULL); assert(blkmem != NULL); SCIP_ALLOC( BMSallocBlockMemory(blkmem, conssetchg) ); (*conssetchg)->addedconss = NULL; (*conssetchg)->disabledconss = NULL; (*conssetchg)->addedconsssize = 0; (*conssetchg)->naddedconss = 0; (*conssetchg)->disabledconsssize = 0; (*conssetchg)->ndisabledconss = 0; return SCIP_OKAY; } /** releases all constraints of the constraint set change data */ static SCIP_RETCODE conssetchgRelease( SCIP_CONSSETCHG* conssetchg, /**< constraint set change data */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set /**< global SCIP settings */ ) { int i; assert(conssetchg != NULL); /* release constraints */ for( i = 0; i < conssetchg->naddedconss; ++i ) { if( conssetchg->addedconss[i] != NULL ) { SCIP_CALL( SCIPconsRelease(&conssetchg->addedconss[i], blkmem, set) ); } } for( i = 0; i < conssetchg->ndisabledconss; ++i ) { if( conssetchg->disabledconss[i] != NULL ) { SCIP_CALL( SCIPconsRelease(&conssetchg->disabledconss[i], blkmem, set) ); } } return SCIP_OKAY; } /** frees constraint set change data and releases all included constraints */ SCIP_RETCODE SCIPconssetchgFree( SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set /**< global SCIP settings */ ) { assert(conssetchg != NULL); assert(blkmem != NULL); if( *conssetchg != NULL ) { /* release constraints */ SCIP_CALL( conssetchgRelease(*conssetchg, blkmem, set) ); /* free memory */ BMSfreeBlockMemoryArrayNull(blkmem, &(*conssetchg)->addedconss, (*conssetchg)->addedconsssize); BMSfreeBlockMemoryArrayNull(blkmem, &(*conssetchg)->disabledconss, (*conssetchg)->disabledconsssize); BMSfreeBlockMemory(blkmem, conssetchg); } return SCIP_OKAY; } /** ensures, that addedconss array can store at least num entries */ static SCIP_RETCODE conssetchgEnsureAddedconssSize( SCIP_CONSSETCHG* conssetchg, /**< constraint set change data structure */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ int num /**< minimum number of entries to store */ ) { assert(conssetchg != NULL); if( num > conssetchg->addedconsssize ) { int newsize; newsize = SCIPsetCalcMemGrowSize(set, num); SCIP_ALLOC( BMSreallocBlockMemoryArray(blkmem, &conssetchg->addedconss, conssetchg->addedconsssize, newsize) ); conssetchg->addedconsssize = newsize; } assert(num <= conssetchg->addedconsssize); return SCIP_OKAY; } /** ensures, that disabledconss array can store at least num entries */ static SCIP_RETCODE conssetchgEnsureDisabledconssSize( SCIP_CONSSETCHG* conssetchg, /**< constraint set change data structure */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ int num /**< minimum number of entries to store */ ) { assert(conssetchg != NULL); if( num > conssetchg->disabledconsssize ) { int newsize; newsize = SCIPsetCalcMemGrowSize(set, num); SCIP_ALLOC( BMSreallocBlockMemoryArray(blkmem, &conssetchg->disabledconss, conssetchg->disabledconsssize, newsize) ); conssetchg->disabledconsssize = newsize; } assert(num <= conssetchg->disabledconsssize); return SCIP_OKAY; } /** adds constraint addition to constraint set changes, and captures constraint; activates constraint if the * constraint set change data is currently active */ SCIP_RETCODE SCIPconssetchgAddAddedCons( SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change data structure */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_CONS* cons, /**< added constraint */ int depth, /**< depth of constraint set change's node */ SCIP_Bool focusnode, /**< does the constraint set change belong to the focus node? */ SCIP_Bool active /**< is the constraint set change currently active? */ ) { assert(conssetchg != NULL); assert(cons != NULL); /* if constraint set change doesn't exist, create it */ if( *conssetchg == NULL ) { SCIP_CALL( conssetchgCreate(conssetchg, blkmem) ); } /* add constraint to the addedconss array */ SCIP_CALL( conssetchgEnsureAddedconssSize(*conssetchg, blkmem, set, (*conssetchg)->naddedconss+1) ); (*conssetchg)->addedconss[(*conssetchg)->naddedconss] = cons; (*conssetchg)->naddedconss++; /* undelete constraint, if it was globally deleted in the past */ cons->deleted = FALSE; /* capture constraint */ SCIPconsCapture(cons); /* activate constraint, if node is active */ if( active && !SCIPconsIsActive(cons) ) { SCIP_CALL( SCIPconsActivate(cons, set, stat, depth, focusnode) ); assert(SCIPconsIsActive(cons)); /* remember, that this constraint set change data was responsible for the constraint's addition */ cons->addconssetchg = *conssetchg; cons->addarraypos = (*conssetchg)->naddedconss-1; } return SCIP_OKAY; } /** adds constraint disabling to constraint set changes, and captures constraint */ SCIP_RETCODE SCIPconssetchgAddDisabledCons( SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change data structure */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_CONS* cons /**< disabled constraint */ ) { assert(conssetchg != NULL); assert(cons != NULL); /* if constraint set change doesn't exist, create it */ if( *conssetchg == NULL ) { SCIP_CALL( conssetchgCreate(conssetchg, blkmem) ); } /* add constraint to the disabledconss array */ SCIP_CALL( conssetchgEnsureDisabledconssSize(*conssetchg, blkmem, set, (*conssetchg)->ndisabledconss+1) ); (*conssetchg)->disabledconss[(*conssetchg)->ndisabledconss] = cons; (*conssetchg)->ndisabledconss++; /* capture constraint */ SCIPconsCapture(cons); return SCIP_OKAY; } /** deactivates, deletes, and releases constraint from the addedconss array of the constraint set change data */ static SCIP_RETCODE conssetchgDelAddedCons( SCIP_CONSSETCHG* conssetchg, /**< constraint set change to delete constraint from */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ int arraypos /**< position of constraint in disabledconss array */ ) { SCIP_CONS* cons; assert(conssetchg != NULL); assert(conssetchg->addedconss != NULL); assert(0 <= arraypos && arraypos < conssetchg->naddedconss); cons = conssetchg->addedconss[arraypos]; assert(cons != NULL); SCIPsetDebugMsg(set, "delete added constraint <%s> at position %d from constraint set change data\n", cons->name, arraypos); /* remove the link to the constraint set change data */ if( cons->addconssetchg == conssetchg ) { cons->addconssetchg = NULL; cons->addarraypos = -1; } /* release constraint */ SCIP_CALL( SCIPconsRelease(&conssetchg->addedconss[arraypos], blkmem, set) ); /* we want to keep the order of the constraint additions: move all subsequent constraints one slot to the front */ for( ; arraypos < conssetchg->naddedconss-1; ++arraypos ) { conssetchg->addedconss[arraypos] = conssetchg->addedconss[arraypos+1]; assert(conssetchg->addedconss[arraypos] != NULL); if( conssetchg->addedconss[arraypos]->addconssetchg == conssetchg ) { assert(conssetchg->addedconss[arraypos]->addarraypos == arraypos+1); conssetchg->addedconss[arraypos]->addarraypos = arraypos; } } conssetchg->naddedconss--; return SCIP_OKAY; } /** deletes and releases deactivated constraint from the disabledconss array of the constraint set change data */ static SCIP_RETCODE conssetchgDelDisabledCons( SCIP_CONSSETCHG* conssetchg, /**< constraint set change to apply */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ int arraypos /**< position of constraint in disabledconss array */ ) { assert(conssetchg != NULL); assert(0 <= arraypos && arraypos < conssetchg->ndisabledconss); assert(conssetchg->disabledconss[arraypos] != NULL); SCIPsetDebugMsg(set, "delete disabled constraint <%s> at position %d from constraint set change data\n", conssetchg->disabledconss[arraypos]->name, arraypos); /* release constraint */ SCIP_CALL( SCIPconsRelease(&conssetchg->disabledconss[arraypos], blkmem, set) ); /* we want to keep the order of the constraint disablings: move all subsequent constraints one slot to the front */ for( ; arraypos < conssetchg->ndisabledconss-1; ++arraypos ) { conssetchg->disabledconss[arraypos] = conssetchg->disabledconss[arraypos+1]; assert(conssetchg->disabledconss[arraypos] != NULL); } conssetchg->ndisabledconss--; return SCIP_OKAY; } /** gets added constraints data for a constraint set change */ void SCIPconssetchgGetAddedConsData( SCIP_CONSSETCHG* conssetchg, /**< constraint set change to get data from */ SCIP_CONS*** conss, /**< reference to constraints array added in the conssetchg, or NULL */ int* nconss /**< reference to store the size of the constraints array, or NULL */ ) { assert(conssetchg != NULL); if( conss != NULL ) *conss = conssetchg->addedconss; if( nconss != NULL ) *nconss = conssetchg->naddedconss; } /** applies constraint set change */ SCIP_RETCODE SCIPconssetchgApply( SCIP_CONSSETCHG* conssetchg, /**< constraint set change to apply */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ int depth, /**< depth of constraint set change's node */ SCIP_Bool focusnode /**< does the constraint set change belong to the focus node? */ ) { SCIP_CONS* cons; int i; if( conssetchg == NULL ) return SCIP_OKAY; SCIPsetDebugMsg(set, "applying constraint set changes at %p: %d constraint additions, %d constraint disablings\n", (void*)conssetchg, conssetchg->naddedconss, conssetchg->ndisabledconss); /* apply constraint additions */ i = 0; while( i < conssetchg->naddedconss ) { cons = conssetchg->addedconss[i]; assert(cons != NULL); assert(!cons->update); /* if constraint is already active, or if constraint is globally deleted, it can be removed from addedconss array */ if( cons->active || cons->deleted ) { /* delete constraint from addedcons array, the empty slot is now used by the next constraint, * and naddedconss was decreased, so do not increase i */ SCIP_CALL( conssetchgDelAddedCons(conssetchg, blkmem, set, i) ); } else { assert(cons->addconssetchg == NULL); assert(cons->addarraypos == -1); /* activate constraint */ SCIP_CALL( SCIPconsActivate(cons, set, stat, depth, focusnode) ); assert(cons->active); assert(!cons->update); /* remember, that this constraint set change data was responsible for the constraint's addition */ cons->addconssetchg = conssetchg; cons->addarraypos = i; ++i; /* handle the next constraint */ } } /* apply constraint disablings */ i = 0; while( i < conssetchg->ndisabledconss ) { cons = conssetchg->disabledconss[i]; assert(cons != NULL); assert(!cons->update); /* if the constraint is disabled, we can permanently remove it from the disabledconss array */ if( !cons->enabled ) { SCIPsetDebugMsg(set, "constraint <%s> of handler <%s> was deactivated -> remove it from disabledconss array\n", cons->name, cons->conshdlr->name); /* release and remove constraint from the disabledconss array, the empty slot is now used by the next constraint * and ndisabledconss was decreased, so do not increase i */ SCIP_CALL( conssetchgDelDisabledCons(conssetchg, blkmem, set, i) ); } else { assert(cons->addarraypos >= 0); assert(!cons->deleted); /* deleted constraints must not be enabled! */ SCIP_CALL( SCIPconsDisable(conssetchg->disabledconss[i], set, stat) ); assert(!cons->update); assert(!cons->enabled); ++i; /* handle the next constraint */ } } return SCIP_OKAY; } /** undoes constraint set change */ SCIP_RETCODE SCIPconssetchgUndo( SCIP_CONSSETCHG* conssetchg, /**< constraint set change to undo */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { SCIP_CONS* cons; int i; if( conssetchg == NULL ) return SCIP_OKAY; SCIPsetDebugMsg(set, "undoing constraint set changes at %p: %d constraint additions, %d constraint disablings\n", (void*)conssetchg, conssetchg->naddedconss, conssetchg->ndisabledconss); /* undo constraint disablings */ for( i = conssetchg->ndisabledconss-1; i >= 0; --i ) { cons = conssetchg->disabledconss[i]; assert(cons != NULL); assert(!cons->update); /* If the constraint is inactive, we can permanently remove it from the disabledconss array. It was deactivated * in the subtree of the current node but not reactivated on the switching way back to the current node, which * means, the deactivation was more global (i.e. valid on a higher level node) than the current node and the * disabling at the current node doesn't have any effect anymore. * If the constraint is already enabled, we need not to do anything. This may happen on a path A -> B, * if the constraint is disabled at node B, and while processing the subtree of B, it is also disabled at * the more global node A. Then on the switching path back to A, the constraint is enabled at node B (which is * actually wrong, since it now should be disabled in the whole subtree of A, but we cannot know this), and * again enabled at node A (where enabling is ignored). If afterwards, a subnode of B is processed, the * switching disables the constraint in node A, and the disabling is then removed from node B. */ if( !cons->active ) { SCIPsetDebugMsg(set, "constraint <%s> of handler <%s> was deactivated -> remove it from disabledconss array\n", cons->name, cons->conshdlr->name); /* release and remove constraint from the disabledconss array */ SCIP_CALL( conssetchgDelDisabledCons(conssetchg, blkmem, set, i) ); } else if( !cons->enabled ) { assert(cons->addarraypos >= 0); assert(!cons->deleted); /* deleted constraints must not be active! */ SCIP_CALL( SCIPconsEnable(cons, set, stat) ); assert(!cons->update); assert(!cons->active || cons->enabled); } } /* undo constraint additions */ for( i = conssetchg->naddedconss-1; i >= 0; --i ) { cons = conssetchg->addedconss[i]; assert(cons != NULL); assert(!cons->update); /* If the constraint is already deactivated, we need not to do anything. This may happen on a path A -> B, * if the constraint is added at node B, and while processing the subtree of B, it is also added at * the more global node A. Then on the switching path back to A, the node is deactivated at node B (which is * actually wrong, since it now should be active in the whole subtree of A, but we cannot know this), and * again deactivated at node A (where deactivation is ignored). If afterwards, a subnode of B is processed, the * switching activates the constraint in node A, and the activation is then removed from node B. */ if( cons->active ) { assert(cons->addconssetchg == conssetchg); assert(cons->addarraypos == i); /* deactivate constraint */ SCIP_CALL( SCIPconsDeactivate(cons, set, stat) ); /* unlink the constraint and the constraint set change */ cons->addconssetchg = NULL; cons->addarraypos = -1; } assert(!cons->active); assert(!cons->update); } return SCIP_OKAY; } /** applies constraint set change to the global problem and deletes the constraint set change data */ SCIP_RETCODE SCIPconssetchgMakeGlobal( SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change data */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_PROB* prob, /**< problem data */ SCIP_REOPT* reopt /**< reoptimization data */ ) { SCIP_CONS* cons; int i; assert(conssetchg != NULL); /* nothing to do on empty constraint set change data */ if( *conssetchg == NULL ) return SCIP_OKAY; SCIPsetDebugMsg(set, "moving constraint set changes at %p to global problem: %d constraint additions, %d constraint disablings\n", (void*)*conssetchg, (*conssetchg)->naddedconss, (*conssetchg)->ndisabledconss); /* apply constraint additions to the global problem (loop backwards, because then conssetchgDelAddedCons() is * more efficient) */ for( i = (*conssetchg)->naddedconss-1; i >= 0; --i ) { cons = (*conssetchg)->addedconss[i]; assert(cons != NULL); assert(!cons->update); /* only move constraints that are not sticking at the current node */ if( !SCIPconsIsStickingAtNode(cons) ) { /* because we first have to delete the constraint, we have to capture it in order to not loose it */ SCIPconsCapture(cons); /* delete constraint addition from constraint set change data */ SCIP_CALL( conssetchgDelAddedCons(*conssetchg, blkmem, set, i) ); /* don't move deleted constraints to the global problem */ if( !cons->deleted ) { SCIP_CALL( SCIPprobAddCons(prob, set, stat, cons) ); } /* release constraint */ SCIP_CALL( SCIPconsRelease(&cons, blkmem, set) ); } } /* apply constraint disablings to the global problem (loop backwards, because then conssetchgDelDisabledCons() is * more efficient) */ for( i = (*conssetchg)->ndisabledconss-1; i >= 0; --i ) { cons = (*conssetchg)->disabledconss[i]; assert(cons != NULL); assert(!cons->update); /* only delete constraints that are not sticking at the current node */ if( !SCIPconsIsStickingAtNode(cons) ) { /* globally delete constraint */ if( !cons->deleted ) { SCIP_CALL( SCIPconsDelete(cons, blkmem, set, stat, prob, reopt) ); } /* release and remove constraint from the disabledconss array */ SCIP_CALL( conssetchgDelDisabledCons(*conssetchg, blkmem, set, i) ); } } if( (*conssetchg)->naddedconss == 0 && (*conssetchg)->ndisabledconss == 0 ) { /* free empty constraint set change data */ SCIP_CALL( SCIPconssetchgFree(conssetchg, blkmem, set) ); } return SCIP_OKAY; } /* * Constraint methods */ /** creates and captures a constraint, and inserts it into the conss array of its constraint handler * * @warning If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution * may be declared feasible even if it violates this particular constraint. * This constellation should only be used, if no LP or pseudo solution can violate the constraint -- e.g. if a * local constraint is redundant due to the variable's local bounds. */ SCIP_RETCODE SCIPconsCreate( SCIP_CONS** cons, /**< pointer to constraint */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ const char* name, /**< name of constraint */ SCIP_CONSHDLR* conshdlr, /**< constraint handler for this constraint */ SCIP_CONSDATA* consdata, /**< data for this specific constraint */ SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */ SCIP_Bool separate, /**< should the constraint be separated during LP processing? * Usually set to TRUE. */ SCIP_Bool enforce, /**< should the constraint be enforced during node processing? * TRUE for model constraints, FALSE for additional, redundant constraints. */ SCIP_Bool check, /**< should the constraint be checked for feasibility? * TRUE for model constraints, FALSE for additional, redundant constraints. */ SCIP_Bool propagate, /**< should the constraint be propagated during node processing? * Usually set to TRUE. */ SCIP_Bool local, /**< is constraint only valid locally? * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */ SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)? * Usually set to FALSE. In column generation applications, set to TRUE if pricing * adds coefficients to this constraint. */ SCIP_Bool dynamic, /**< is constraint subject to aging? * Usually set to FALSE. Set to TRUE for own cuts which * are separated as constraints. */ SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup? * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */ SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even * if it may be moved to a more global node? * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */ SCIP_Bool original, /**< is constraint belonging to the original problem? */ SCIP_Bool deleteconsdata /**< has the constraint data to be deleted if constraint is freed? */ ) { int i; assert(cons != NULL); assert(blkmem != NULL); assert(set != NULL); assert(name != NULL); assert(conshdlr != NULL); assert(!original || deleteconsdata); /* create constraint data */ SCIP_ALLOC( BMSallocBlockMemory(blkmem, cons) ); SCIP_ALLOC( BMSduplicateBlockMemoryArray(blkmem, &(*cons)->name, name, strlen(name)+1) ); #ifndef NDEBUG (*cons)->scip = set->scip; #endif (*cons)->conshdlr = conshdlr; (*cons)->consdata = consdata; (*cons)->transorigcons = NULL; (*cons)->addconssetchg = NULL; (*cons)->addarraypos = -1; (*cons)->consspos = -1; (*cons)->initconsspos = -1; (*cons)->sepaconsspos = -1; (*cons)->enfoconsspos = -1; (*cons)->checkconsspos = -1; (*cons)->propconsspos = -1; (*cons)->activedepth = -2; (*cons)->validdepth = (local ? -1 : 0); (*cons)->age = 0.0; (*cons)->nuses = 0; (*cons)->nupgradelocks = 0; (*cons)->initial = initial; (*cons)->separate = separate; (*cons)->enforce = enforce; (*cons)->check = check; (*cons)->propagate = propagate; (*cons)->sepaenabled = separate; (*cons)->propenabled = propagate; (*cons)->local = local; (*cons)->modifiable = modifiable; (*cons)->dynamic = dynamic; (*cons)->removable = removable; (*cons)->stickingatnode = stickingatnode; (*cons)->original = original; (*cons)->deleteconsdata = deleteconsdata; (*cons)->active = FALSE; (*cons)->conflict = FALSE; (*cons)->enabled = FALSE; (*cons)->obsolete = FALSE; (*cons)->markpropagate = TRUE; (*cons)->deleted = FALSE; (*cons)->update = FALSE; (*cons)->updateinsert = FALSE; (*cons)->updateactivate = FALSE; (*cons)->updatedeactivate = FALSE; (*cons)->updateenable = FALSE; (*cons)->updatedisable = FALSE; (*cons)->updatesepaenable = FALSE; (*cons)->updatesepadisable = FALSE; (*cons)->updatepropenable = FALSE; (*cons)->updatepropdisable = FALSE; (*cons)->updateobsolete = FALSE; (*cons)->updatemarkpropagate = FALSE; (*cons)->updateunmarkpropagate = FALSE; (*cons)->updatefree = FALSE; (*cons)->updateactfocus = FALSE; for( i = 0; i < NLOCKTYPES; i++ ) { (*cons)->nlockspos[i] = 0; (*cons)->nlocksneg[i] = 0; } /* capture constraint */ SCIPconsCapture(*cons); /* insert the constraint as inactive constraint into the transformed constraints array */ if( !original ) { /* check, if inserting constraint should be delayed */ if( conshdlrAreUpdatesDelayed(conshdlr) ) { SCIPsetDebugMsg(set, " -> delaying insertion of constraint <%s>\n", (*cons)->name); (*cons)->updateinsert = TRUE; SCIP_CALL( conshdlrAddUpdateCons((*cons)->conshdlr, set, *cons) ); assert((*cons)->update); assert((*cons)->nuses == 2); } else { SCIP_CALL( conshdlrAddCons(conshdlr, set, *cons) ); } } checkConssArrays(conshdlr); return SCIP_OKAY; } /** copies source constraint of source SCIP into the target constraint for the target SCIP, using the variable map for * mapping the variables of the source SCIP to the variables of the target SCIP; if the copying process was successful * a constraint is created and captured; * * @warning If a constraint is marked to be checked for feasibility but not to be enforced, an LP or pseudo solution * may be declared feasible even if it violates this particular constraint. * This constellation should only be used, if no LP or pseudo solution can violate the constraint -- e.g. if a * local constraint is redundant due to the variable's local bounds. */ SCIP_RETCODE SCIPconsCopy( SCIP_CONS** cons, /**< pointer to store the created target constraint */ SCIP_SET* set, /**< global SCIP settings of the target SCIP */ const char* name, /**< name of constraint, or NULL if the name of the source constraint should be used */ SCIP* sourcescip, /**< source SCIP data structure */ SCIP_CONSHDLR* sourceconshdlr, /**< source constraint handler for this constraint */ SCIP_CONS* sourcecons, /**< source constraint of the source SCIP */ SCIP_HASHMAP* varmap, /**< a SCIP_HASHMAP mapping variables of the source SCIP to corresponding * variables of the target SCIP */ SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of source constraints to the corresponding * target constraints, must not be NULL! */ SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? */ SCIP_Bool separate, /**< should the constraint be separated during LP processing? */ SCIP_Bool enforce, /**< should the constraint be enforced during node processing? */ SCIP_Bool check, /**< should the constraint be checked for feasibility? */ SCIP_Bool propagate, /**< should the constraint be propagated during node processing? */ SCIP_Bool local, /**< is constraint only valid locally? */ SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)? */ SCIP_Bool dynamic, /**< is constraint subject to aging? */ SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup? */ SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even * if it may be moved to a more global node? */ SCIP_Bool global, /**< create a global or a local copy? */ SCIP_Bool* valid /**< pointer to store whether the copying was valid or not */ ) { assert(cons != NULL); assert(set != NULL); assert(sourcescip != NULL); assert(sourceconshdlr != NULL); assert(sourcecons != NULL); assert(varmap != NULL); assert(consmap != NULL); assert(valid != NULL); /* if constraint handler does not support copying, success will return false. Constraints handlers have to actively set this to true. */ (*valid) = FALSE; if( sourceconshdlr->conscopy != NULL ) { SCIP_CALL( sourceconshdlr->conscopy(set->scip, cons, name, sourcescip, sourceconshdlr, sourcecons, varmap, consmap, initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, global, valid) ); } return SCIP_OKAY; } /** parses constraint information (in cip format) out of a string; if the parsing process was successful a constraint is * created, captured, and inserted into the conss array of its constraint handler. * * @warning If a constraint is marked to be checked for feasibility but not to be enforced, an LP or pseudo solution * may be declared feasible even if it violates this particular constraint. * This constellation should only be used, if no LP or pseudo solution can violate the constraint -- e.g. if a * local constraint is redundant due to the variable's local bounds. */ SCIP_RETCODE SCIPconsParse( SCIP_CONS** cons, /**< pointer to constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_MESSAGEHDLR* messagehdlr, /**< message handler of target SCIP */ const char* str, /**< string to parse for constraint */ SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */ SCIP_Bool separate, /**< should the constraint be separated during LP processing? * Usually set to TRUE. */ SCIP_Bool enforce, /**< should the constraint be enforced during node processing? * TRUE for model constraints, FALSE for additional, redundant constraints. */ SCIP_Bool check, /**< should the constraint be checked for feasibility? * TRUE for model constraints, FALSE for additional, redundant constraints. */ SCIP_Bool propagate, /**< should the constraint be propagated during node processing? * Usually set to TRUE. */ SCIP_Bool local, /**< is constraint only valid locally? * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */ SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)? * Usually set to FALSE. In column generation applications, set to TRUE if pricing * adds coefficients to this constraint. */ SCIP_Bool dynamic, /**< is constraint subject to aging? * Usually set to FALSE. Set to TRUE for own cuts which * are separated as constraints. */ SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup? * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */ SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even * if it may be moved to a more global node? * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */ SCIP_Bool* success /**< pointer store if the paring process was successful */ ) { SCIP_CONSHDLR* conshdlr; char conshdlrname[SCIP_MAXSTRLEN]; char consname[SCIP_MAXSTRLEN]; char* endptr; assert(cons != NULL); assert(set != NULL); (*success) = FALSE; /* scan constraint handler name */ assert(str != NULL); SCIPstrCopySection(str, '[', ']', conshdlrname, SCIP_MAXSTRLEN, &endptr); if ( endptr == NULL || endptr == str ) { SCIPmessagePrintWarning(messagehdlr, "Syntax error: Could not find constraint handler name.\n"); return SCIP_OKAY; } assert(endptr != NULL); SCIPsetDebugMsg(set, "constraint handler name <%s>\n", conshdlrname); /* scan constraint name */ SCIPstrCopySection(endptr, '<', '>', consname, SCIP_MAXSTRLEN, &endptr); if ( endptr == NULL || endptr == str ) { SCIPmessagePrintWarning(messagehdlr, "Syntax error: Could not find constraint name.\n"); return SCIP_OKAY; } assert(endptr != NULL); SCIPsetDebugMsg(set, "constraint name <%s>\n", consname); str = endptr; /* skip white space */ SCIP_CALL( SCIPskipSpace((char**)&str) ); /* check for colon */ if( *str != ':' ) { SCIPmessagePrintWarning(messagehdlr, "Syntax error: Could not find colon ':' after constraint name.\n"); return SCIP_OKAY; } /* skip colon */ ++str; /* skip white space */ SCIP_CALL( SCIPskipSpace((char**)&str) ); /* check if a constraint handler with parsed name exists */ conshdlr = SCIPsetFindConshdlr(set, conshdlrname); if( conshdlr == NULL ) { SCIPmessagePrintWarning(messagehdlr, "constraint handler <%s> doesn't exist in SCIP data structure\n", conshdlrname); } else { assert( conshdlr != NULL ); if ( conshdlr->consparse == NULL ) { SCIPmessagePrintWarning(messagehdlr, "constraint handler <%s> does not support parsing constraints\n", conshdlrname); } else { SCIP_CALL( conshdlr->consparse(set->scip, conshdlr, cons, consname, str, initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, success) ); } } return SCIP_OKAY; } /** change name of given constraint */ SCIP_RETCODE SCIPconsChgName( SCIP_CONS* cons, /**< problem constraint */ BMS_BLKMEM* blkmem, /**< block memory buffer */ const char* name /**< new name of constraint */ ) { assert(cons != NULL); assert(cons->name != NULL); /* free old constraint name */ BMSfreeBlockMemoryArray(blkmem, &cons->name, strlen(cons->name)+1); /* copy new constraint name */ SCIP_ALLOC( BMSduplicateBlockMemoryArray(blkmem, &cons->name, name, strlen(name)+1) ); return SCIP_OKAY; } /** frees a constraint and removes it from the conss array of its constraint handler */ SCIP_RETCODE SCIPconsFree( SCIP_CONS** cons, /**< constraint to free */ BMS_BLKMEM* blkmem, /**< block memory buffer */ SCIP_SET* set /**< global SCIP settings */ ) { assert(cons != NULL); assert(*cons != NULL); assert((*cons)->conshdlr != NULL); assert((*cons)->nuses == 0); assert(!(*cons)->active); assert(!(*cons)->update); assert(!(*cons)->original || (*cons)->transorigcons == NULL); assert(blkmem != NULL); assert(set != NULL); assert((*cons)->scip == set->scip); SCIPsetDebugMsg(set, "freeing constraint <%s> at conss pos %d of handler <%s>\n", (*cons)->name, (*cons)->consspos, (*cons)->conshdlr->name); /* free constraint data */ if( (*cons)->conshdlr->consdelete != NULL && (*cons)->consdata != NULL && (*cons)->deleteconsdata ) { SCIP_CALL( (*cons)->conshdlr->consdelete(set->scip, (*cons)->conshdlr, *cons, &(*cons)->consdata) ); } else if( !(*cons)->deleteconsdata ) (*cons)->consdata = NULL; assert((*cons)->consdata == NULL); /* unlink transformed and original constraint */ if( (*cons)->transorigcons != NULL ) { assert(!(*cons)->original); assert((*cons)->transorigcons->original); assert((*cons)->transorigcons->transorigcons == *cons); (*cons)->transorigcons->transorigcons = NULL; } /* remove constraint from the transformed constraints array */ if( !(*cons)->original ) { conshdlrDelCons((*cons)->conshdlr, *cons); checkConssArrays((*cons)->conshdlr); } assert((*cons)->consspos == -1); /* free constraint */ BMSfreeBlockMemoryArray(blkmem, &(*cons)->name, strlen((*cons)->name)+1); BMSfreeBlockMemory(blkmem, cons); return SCIP_OKAY; } /** increases usage counter of constraint */ void SCIPconsCapture( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); assert(cons->nuses >= 0); SCIPdebugMessage("capture constraint <%s> with nuses=%d, cons pointer %p\n", cons->name, cons->nuses, (void*)cons); cons->nuses++; } /** decreases usage counter of constraint, and frees memory if necessary */ SCIP_RETCODE SCIPconsRelease( SCIP_CONS** cons, /**< pointer to constraint */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set /**< global SCIP settings */ ) { assert(blkmem != NULL); assert(cons != NULL); assert(*cons != NULL); assert((*cons)->conshdlr != NULL); assert((*cons)->nuses >= 1); assert(set != NULL); assert((*cons)->scip == set->scip); SCIPsetDebugMsg(set, "release constraint <%s> with nuses=%d, cons pointer %p\n", (*cons)->name, (*cons)->nuses, (void*)(*cons)); (*cons)->nuses--; if( (*cons)->nuses == 0 ) { assert(!(*cons)->active || (*cons)->updatedeactivate); /* check, if freeing constraint should be delayed */ if( conshdlrAreUpdatesDelayed((*cons)->conshdlr) ) { SCIPsetDebugMsg(set, " -> delaying freeing constraint <%s>\n", (*cons)->name); (*cons)->updatefree = TRUE; SCIP_CALL( conshdlrAddUpdateCons((*cons)->conshdlr, set, *cons) ); assert((*cons)->update); assert((*cons)->nuses == 1); } else { SCIP_CALL( SCIPconsFree(cons, blkmem, set) ); } } *cons = NULL; return SCIP_OKAY; } /** outputs constraint information to file stream */ SCIP_RETCODE SCIPconsPrint( SCIP_CONS* cons, /**< constraint to print */ SCIP_SET* set, /**< global SCIP settings */ SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ FILE* file /**< output file (or NULL for standard output) */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); conshdlr = cons->conshdlr; assert(conshdlr != NULL); SCIPmessageFPrintInfo(messagehdlr, file, " [%s] <%s>: ", conshdlr->name, cons->name); if( conshdlr->consprint != NULL ) { SCIP_CALL( conshdlr->consprint(set->scip, conshdlr, cons, file) ); } else SCIPmessageFPrintInfo(messagehdlr, file, "constraint handler <%s> doesn't support printing constraint", conshdlr->name); return SCIP_OKAY; } /** method to collect the variables of a constraint * * If the number of variables is greater than the available slots in the variable array, nothing happens except that * the success point is set to FALSE. With the method SCIPconsGetNVars() it is possible to get the number of variables * a constraint has in its scope. * * @note The success pointer indicates if all variables were copied into the vars arrray. * * @note It might be that a constraint handler does not support this functionality, in that case the success pointer is * set to FALSE. */ SCIP_RETCODE SCIPconsGetVars( SCIP_CONS* cons, /**< constraint to print */ SCIP_SET* set, /**< global SCIP settings */ SCIP_VAR** vars, /**< array to store the involved variable of the constraint */ int varssize, /**< available slots in vars array which is needed to check if the array is large enough */ SCIP_Bool* success /**< pointer to store whether the variables are successfully copied */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); conshdlr = cons->conshdlr; assert(conshdlr != NULL); if( conshdlr->consgetvars != NULL ) { SCIP_CALL( conshdlr->consgetvars(set->scip, conshdlr, cons, vars, varssize, success) ); } else { (*success) = FALSE; } return SCIP_OKAY; } /** method to collect the number of variables of a constraint * * @note The success pointer indicates if the contraint handler was able to return the number of variables * * @note It might be that a constraint handler does not support this functionality, in that case the success pointer is * set to FALSE */ SCIP_RETCODE SCIPconsGetNVars( SCIP_CONS* cons, /**< constraint to print */ SCIP_SET* set, /**< global SCIP settings */ int* nvars, /**< pointer to store the number of variables */ SCIP_Bool* success /**< pointer to store whether the constraint successfully returned the number of variables */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); conshdlr = cons->conshdlr; assert(conshdlr != NULL); if( conshdlr->consgetnvars != NULL ) { SCIP_CALL( conshdlr->consgetnvars(set->scip, conshdlr, cons, nvars, success) ); } else { (*nvars) = 0; (*success) = FALSE; } return SCIP_OKAY; } /** globally removes constraint from all subproblems; removes constraint from the constraint set change data of the * node, where it was created, or from the problem, if it was a problem constraint */ SCIP_RETCODE SCIPconsDelete( SCIP_CONS* cons, /**< constraint to delete */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_PROB* prob, /**< problem data */ SCIP_REOPT* reopt /**< reoptimization data */ ) { assert(cons != NULL); assert(cons->conshdlr != NULL); assert(!cons->active || cons->updatedeactivate || cons->addarraypos >= 0); assert(set != NULL); assert(cons->scip == set->scip); SCIPsetDebugMsg(set, "globally deleting constraint <%s> (delay updates: %d)\n", cons->name, cons->conshdlr->delayupdatecount); /* mark constraint deleted */ cons->deleted = TRUE; /* deactivate constraint, if it is currently active */ if( cons->active && !cons->updatedeactivate ) { SCIP_CALL( SCIPconsDeactivate(cons, set, stat) ); } else cons->updateactivate = FALSE; if( set->reopt_enable && !SCIPreoptConsCanBeDeleted(reopt, cons) ) return SCIP_OKAY; assert(!cons->active || cons->updatedeactivate); assert(!cons->enabled || cons->updatedeactivate); /* remove formerly active constraint from the conssetchg's addedconss / prob's conss array */ if( cons->addarraypos >= 0 ) { if( cons->addconssetchg == NULL ) { /* remove problem constraint from the problem */ SCIP_CALL( SCIPprobDelCons(prob, blkmem, set, stat, cons) ); } else { assert(cons->addconssetchg->addedconss != NULL); assert(0 <= cons->addarraypos && cons->addarraypos < cons->addconssetchg->naddedconss); assert(cons->addconssetchg->addedconss[cons->addarraypos] == cons); /* remove constraint from the constraint set change addedconss array */ SCIP_CALL( conssetchgDelAddedCons(cons->addconssetchg, blkmem, set, cons->addarraypos) ); } } return SCIP_OKAY; } /** gets and captures transformed constraint of a given original constraint; if the constraint is not yet transformed, * a new transformed constraint for this constraint is created */ SCIP_RETCODE SCIPconsTransform( SCIP_CONS* origcons, /**< original constraint */ BMS_BLKMEM* blkmem, /**< block memory buffer */ SCIP_SET* set, /**< global SCIP settings */ SCIP_CONS** transcons /**< pointer to store the transformed constraint */ ) { assert(origcons != NULL); assert(set != NULL); assert(origcons->scip == set->scip); assert(origcons->conshdlr != NULL); assert(origcons->original); assert(transcons != NULL); /* check, if the constraint is already transformed */ if( origcons->transorigcons != NULL ) { *transcons = origcons->transorigcons; SCIPconsCapture(*transcons); } else { /* create transformed constraint */ if( origcons->conshdlr->constrans != NULL ) { /* use constraint handler's own method to transform constraint */ SCIP_CALL( origcons->conshdlr->constrans(set->scip, origcons->conshdlr, origcons, transcons) ); } else { /* create new constraint with a pointer copy of the constraint data */ SCIP_CALL( SCIPconsCreate(transcons, blkmem, set, origcons->name, origcons->conshdlr, origcons->consdata, origcons->initial, origcons->separate, origcons->enforce, origcons->check, origcons->propagate, origcons->local, origcons->modifiable, origcons->dynamic, origcons->removable, origcons->stickingatnode, FALSE, FALSE) ); } /* link original and transformed constraint */ origcons->transorigcons = *transcons; (*transcons)->transorigcons = origcons; /* copy the number of upgradelocks */ (*transcons)->nupgradelocks = origcons->nupgradelocks; /*lint !e732*/ } assert(*transcons != NULL); return SCIP_OKAY; } /** sets the initial flag of the given constraint */ SCIP_RETCODE SCIPconsSetInitial( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_Bool initial /**< new value */ ) { assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->initial != initial ) { cons->initial = initial; if( !cons->original ) { if( cons->initial ) { SCIP_CALL( conshdlrAddInitcons(SCIPconsGetHdlr(cons), set, stat, cons) ); } else { if( cons->initconsspos >= 0 ) { conshdlrDelInitcons(SCIPconsGetHdlr(cons), cons); } } } } return SCIP_OKAY; } /** sets the separate flag of the given constraint */ SCIP_RETCODE SCIPconsSetSeparated( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_Bool separate /**< new value */ ) { assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->separate != separate ) { if( SCIPsetGetStage(set) == SCIP_STAGE_PROBLEM ) { cons->separate = separate; } else if( cons->enabled && cons->sepaenabled ) { if( separate ) { cons->separate = separate; SCIP_CALL( conshdlrAddSepacons(cons->conshdlr, set, cons) ); } else { conshdlrDelSepacons(cons->conshdlr, cons); cons->separate = separate; } } } return SCIP_OKAY; } /** sets the enforce flag of the given constraint */ SCIP_RETCODE SCIPconsSetEnforced( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_Bool enforce /**< new value */ ) { assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->enforce != enforce ) { if( SCIPsetGetStage(set) == SCIP_STAGE_PROBLEM ) { cons->enforce = enforce; } else if( cons->enabled ) { if( enforce ) { cons->enforce = enforce; SCIP_CALL( conshdlrAddEnfocons(cons->conshdlr, set, cons) ); } else { conshdlrDelEnfocons(cons->conshdlr, cons); cons->enforce = enforce; } } } return SCIP_OKAY; } /** sets the check flag of the given constraint */ SCIP_RETCODE SCIPconsSetChecked( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_Bool check /**< new value */ ) { assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->check != check ) { cons->check = check; if( !cons->original ) { /* if constraint is a problem constraint, update variable roundings locks */ if( cons->addconssetchg == NULL && cons->addarraypos >= 0 ) { if( cons->check ) { SCIP_CALL( SCIPconsAddLocks(cons, set, SCIP_LOCKTYPE_MODEL, +1, 0) ); } else { SCIP_CALL( SCIPconsAddLocks(cons, set, SCIP_LOCKTYPE_MODEL, -1, 0) ); } } /* if constraint is active, update the checkconss array of the constraint handler */ if( cons->active ) { if( cons->check ) { SCIP_CALL( conshdlrAddCheckcons(cons->conshdlr, set, cons) ); } else { conshdlrDelCheckcons(cons->conshdlr, cons); } } } } return SCIP_OKAY; } /** sets the propagate flag of the given constraint */ SCIP_RETCODE SCIPconsSetPropagated( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_Bool propagate /**< new value */ ) { assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->propagate != propagate ) { if( SCIPsetGetStage(set) == SCIP_STAGE_PROBLEM ) { cons->propagate = propagate; } else if( cons->enabled && cons->propenabled ) { if( propagate ) { cons->propagate = propagate; SCIP_CALL( conshdlrAddPropcons(cons->conshdlr, set, cons) ); } else { conshdlrDelPropcons(cons->conshdlr, cons); cons->propagate = propagate; } } } return SCIP_OKAY; } /** sets the local flag of the given constraint */ void SCIPconsSetLocal( SCIP_CONS* cons, /**< constraint */ SCIP_Bool local /**< new value */ ) { assert(cons != NULL); cons->local = local; if( !local ) cons->validdepth = 0; } /** sets the modifiable flag of the given constraint */ void SCIPconsSetModifiable( SCIP_CONS* cons, /**< constraint */ SCIP_Bool modifiable /**< new value */ ) { assert(cons != NULL); cons->modifiable = modifiable; } /** sets the dynamic flag of the given constraint */ void SCIPconsSetDynamic( SCIP_CONS* cons, /**< constraint */ SCIP_Bool dynamic /**< new value */ ) { assert(cons != NULL); cons->dynamic = dynamic; } /** sets the removable flag of the given constraint */ void SCIPconsSetRemovable( SCIP_CONS* cons, /**< constraint */ SCIP_Bool removable /**< new value */ ) { assert(cons != NULL); cons->removable = removable; } /** sets the stickingatnode flag of the given constraint */ void SCIPconsSetStickingAtNode( SCIP_CONS* cons, /**< constraint */ SCIP_Bool stickingatnode /**< new value */ ) { assert(cons != NULL); cons->stickingatnode = stickingatnode; } /** gives the constraint a new name; ATTENTION: to old pointer is over written that might * result in a memory leakage */ void SCIPconsSetNamePointer( SCIP_CONS* cons, /**< constraint */ const char* name /**< new name of constraint */ ) { assert( cons != NULL ); assert( name != NULL ); cons->name = (char*)name; } /** gets associated transformed constraint of an original constraint, or NULL if no associated transformed constraint * exists */ SCIP_CONS* SCIPconsGetTransformed( SCIP_CONS* cons /**< constraint */ ) { assert(cons->original); return cons->transorigcons; } /** activates constraint or marks constraint to be activated in next update */ SCIP_RETCODE SCIPconsActivate( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ int depth, /**< depth in the tree where the constraint activation takes place, or -1 for global problem */ SCIP_Bool focusnode /**< does the constraint activation take place at the focus node? */ ) { assert(cons != NULL); assert(!cons->original); assert(!cons->active); assert(!cons->updateactivate); assert(!cons->updatedeactivate); assert(!cons->updateenable); assert(!cons->updatedisable); assert(!cons->updateobsolete); assert(!cons->updatefree); assert(cons->activedepth == -2); assert(cons->conshdlr != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { SCIPsetDebugMsg(set, "delayed activation of constraint <%s> in constraint handler <%s> (depth %d)\n", cons->name, cons->conshdlr->name, depth); cons->updateactivate = TRUE; cons->activedepth = depth; cons->updateactfocus = focusnode; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { SCIP_CALL( conshdlrActivateCons(cons->conshdlr, set, stat, cons, depth, focusnode) ); assert(cons->active); } return SCIP_OKAY; } /** deactivates constraint or marks constraint to be deactivated in next update */ SCIP_RETCODE SCIPconsDeactivate( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { assert(cons != NULL); assert(!cons->original); assert(cons->active); assert(!cons->updateactivate); assert(!cons->updatedeactivate); assert(cons->activedepth >= -1); assert(cons->conshdlr != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { SCIPsetDebugMsg(set, "delayed deactivation of constraint <%s> in constraint handler <%s>\n", cons->name, cons->conshdlr->name); cons->updatedeactivate = TRUE; cons->activedepth = -2; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { SCIP_CALL( conshdlrDeactivateCons(cons->conshdlr, set, stat, cons) ); assert(!cons->active); } return SCIP_OKAY; } /** enables constraint's separation, enforcing, and propagation capabilities or marks them to be enabled in next update */ SCIP_RETCODE SCIPconsEnable( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { assert(cons != NULL); assert(!cons->original); assert(cons->conshdlr != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( !cons->active || cons->updatedeactivate || cons->updateenable || (cons->enabled && !cons->updatedisable) ) return SCIP_OKAY; assert(!cons->updateactivate); if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { cons->updateenable = TRUE; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { SCIP_CALL( conshdlrEnableCons(cons->conshdlr, set, stat, cons) ); assert(cons->enabled); } return SCIP_OKAY; } /** disables constraint's separation, enforcing, and propagation capabilities or marks them to be disabled in next update */ SCIP_RETCODE SCIPconsDisable( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat /**< dynamic problem statistics */ ) { assert(cons != NULL); assert(!cons->original); assert(cons->conshdlr != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->updatedisable || (!cons->enabled && !cons->updateenable) ) return SCIP_OKAY; assert(cons->active); assert(!cons->updateactivate); if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { cons->updatedisable = TRUE; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { SCIP_CALL( conshdlrDisableCons(cons->conshdlr, set, stat, cons) ); assert(!cons->enabled); } return SCIP_OKAY; } /** enables constraint's separation capabilities or marks them to be enabled in next update */ SCIP_RETCODE SCIPconsEnableSeparation( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set /**< global SCIP settings */ ) { assert(cons != NULL); assert(cons->conshdlr != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->updatesepaenable || (cons->sepaenabled && !cons->updatesepadisable) ) return SCIP_OKAY; if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { cons->updatesepadisable = FALSE; cons->updatesepaenable = TRUE; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { SCIP_CALL( conshdlrEnableConsSeparation(cons->conshdlr, set, cons) ); assert(cons->sepaenabled); } return SCIP_OKAY; } /** disables constraint's separation capabilities or marks them to be disabled in next update */ SCIP_RETCODE SCIPconsDisableSeparation( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set /**< global SCIP settings */ ) { assert(cons != NULL); assert(cons->conshdlr != NULL); if( cons->updatesepadisable || (!cons->sepaenabled && !cons->updatesepaenable) ) return SCIP_OKAY; if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { cons->updatesepaenable = FALSE; cons->updatesepadisable = TRUE; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { SCIP_CALL( conshdlrDisableConsSeparation(cons->conshdlr, cons) ); assert(!cons->sepaenabled); } return SCIP_OKAY; } /** enables constraint's propagation capabilities or marks them to be enabled in next update */ SCIP_RETCODE SCIPconsEnablePropagation( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set /**< global SCIP settings */ ) { assert(cons != NULL); assert(cons->conshdlr != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->updatepropenable || (cons->propenabled && !cons->updatepropdisable) ) return SCIP_OKAY; if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { cons->updatepropdisable = FALSE; cons->updatepropenable = TRUE; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { SCIP_CALL( conshdlrEnableConsPropagation(cons->conshdlr, set, cons) ); assert(cons->propenabled); } return SCIP_OKAY; } /** disables constraint's propagation capabilities or marks them to be disabled in next update */ SCIP_RETCODE SCIPconsDisablePropagation( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set /**< global SCIP settings */ ) { assert(cons != NULL); assert(cons->conshdlr != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->updatepropdisable || (!cons->propenabled && !cons->updatepropenable) ) return SCIP_OKAY; if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { cons->updatepropenable = FALSE; cons->updatepropdisable = TRUE; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { SCIP_CALL( conshdlrDisableConsPropagation(cons->conshdlr, cons) ); assert(!cons->propenabled); } return SCIP_OKAY; } /** marks the constraint to be a conflict */ void SCIPconsMarkConflict( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); cons->conflict = TRUE; } /** marks the constraint to be propagated (update might be delayed) */ SCIP_RETCODE SCIPconsMarkPropagate( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set /**< global SCIP settings */ ) { assert(cons != NULL); assert(cons->conshdlr != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->updatemarkpropagate || (cons->markpropagate && !cons->updateunmarkpropagate) ) return SCIP_OKAY; if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { cons->updateunmarkpropagate = FALSE; cons->updatemarkpropagate = TRUE; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { conshdlrMarkConsPropagate(cons->conshdlr, cons); assert(cons->markpropagate || !cons->enabled); } return SCIP_OKAY; } /** unmarks the constraint to be propagated (update might be delayed) */ SCIP_RETCODE SCIPconsUnmarkPropagate( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set /**< global SCIP settings */ ) { assert(cons != NULL); assert(cons->conshdlr != NULL); assert(set != NULL); assert(cons->scip == set->scip); if( cons->updateunmarkpropagate || (!cons->markpropagate && !cons->updatemarkpropagate) ) return SCIP_OKAY; if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { cons->updatemarkpropagate = FALSE; cons->updateunmarkpropagate = TRUE; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { conshdlrUnmarkConsPropagate(cons->conshdlr, cons); assert(!cons->markpropagate || !cons->enabled); } return SCIP_OKAY; } /** adds given value to age of constraint, but age can never become negative; * should be called * - in constraint separation, if no cut was found for this constraint, * - in constraint enforcing, if constraint was feasible, and * - in constraint propagation, if no domain reduction was deduced; * if it's age exceeds the constraint age limit, makes constraint obsolete or marks constraint to be made obsolete * in next update */ SCIP_RETCODE SCIPconsAddAge( SCIP_CONS* cons, /**< constraint */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_PROB* prob, /**< problem data */ SCIP_Real deltaage, /**< value to add to the constraint's age */ SCIP_REOPT* reopt /**< reoptimization data */ ) { assert(cons != NULL); assert(cons->conshdlr != NULL); assert(!cons->updateactivate); assert(set != NULL); assert(cons->scip == set->scip); /* no aging in presolving */ if( set->stage == SCIP_STAGE_PRESOLVING ) return SCIP_OKAY; SCIPsetDebugMsg(set, "adding %g to age (%g) of constraint <%s> of handler <%s>\n", deltaage, cons->age, cons->name, cons->conshdlr->name); cons->age += deltaage; cons->age = MAX(cons->age, 0.0); if( !cons->original ) { if( !cons->check && consExceedsAgelimit(cons, set) ) { SCIP_CALL( SCIPconsDelete(cons, blkmem, set, stat, prob, reopt) ); } else if( !cons->obsolete && consExceedsObsoleteage(cons, set) ) { if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { cons->updateobsolete = TRUE; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { SCIP_CALL( conshdlrMarkConsObsolete(cons->conshdlr, cons) ); assert(cons->obsolete); } } } return SCIP_OKAY; } /** increases age of constraint by 1.0; * should be called * - in constraint separation, if no cut was found for this constraint, * - in constraint enforcing, if constraint was feasible, and * - in constraint propagation, if no domain reduction was deduced; * if it's age exceeds the constraint age limit, makes constraint obsolete or marks constraint to be made obsolete * in next update */ SCIP_RETCODE SCIPconsIncAge( SCIP_CONS* cons, /**< constraint */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_SET* set, /**< global SCIP settings */ SCIP_STAT* stat, /**< dynamic problem statistics */ SCIP_PROB* prob, /**< problem data */ SCIP_REOPT* reopt /**< reoptimization data */ ) { SCIP_CALL( SCIPconsAddAge(cons, blkmem, set, stat, prob, 1.0, reopt) ); return SCIP_OKAY; } /** resets age of constraint to zero; * should be called * - in constraint separation, if a cut was found for this constraint, * - in constraint enforcing, if the constraint was violated, and * - in constraint propagation, if a domain reduction was deduced; * if it was obsolete, makes constraint useful again or marks constraint to be made useful again in next update */ SCIP_RETCODE SCIPconsResetAge( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set /**< global SCIP settings */ ) { assert(cons != NULL); assert(cons->conshdlr != NULL); assert(!cons->updateactivate); assert(set != NULL); assert(cons->scip == set->scip); SCIPsetDebugMsg(set, "resetting age %g of constraint <%s> of handler <%s>\n", cons->age, cons->name, cons->conshdlr->name); conshdlrUpdateAgeresetavg(cons->conshdlr, cons->age); cons->age = 0.0; if( cons->obsolete ) { assert(!cons->original); if( conshdlrAreUpdatesDelayed(cons->conshdlr) ) { cons->updateobsolete = TRUE; SCIP_CALL( conshdlrAddUpdateCons(cons->conshdlr, set, cons) ); assert(cons->update); } else { SCIP_CALL( conshdlrMarkConsUseful(cons->conshdlr, cons) ); assert(!cons->obsolete); } } return SCIP_OKAY; } /** resolves the given conflicting bound, that was deduced by the given constraint, by putting all "reason" bounds * leading to the deduction into the conflict queue with calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(), * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar(); * * @note it is sufficient to explain the relaxed bound change */ SCIP_RETCODE SCIPconsResolvePropagation( SCIP_CONS* cons, /**< constraint that deduced the assignment */ SCIP_SET* set, /**< global SCIP settings */ SCIP_VAR* infervar, /**< variable whose bound was deduced by the constraint */ int inferinfo, /**< user inference information attached to the bound change */ SCIP_BOUNDTYPE inferboundtype, /**< bound that was deduced (lower or upper bound) */ SCIP_BDCHGIDX* bdchgidx, /**< bound change index, representing the point of time where change took place */ SCIP_Real relaxedbd, /**< the relaxed bound */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { SCIP_CONSHDLR* conshdlr; assert(set != NULL); assert(cons != NULL); assert((inferboundtype == SCIP_BOUNDTYPE_LOWER && SCIPgetVarLbAtIndex(set->scip, infervar, bdchgidx, TRUE) > SCIPvarGetLbGlobal(infervar)) || (inferboundtype == SCIP_BOUNDTYPE_UPPER && SCIPgetVarUbAtIndex(set->scip, infervar, bdchgidx, TRUE) < SCIPvarGetUbGlobal(infervar))); assert(result != NULL); assert(cons->scip == set->scip); *result = SCIP_DIDNOTRUN; conshdlr = cons->conshdlr; assert(conshdlr != NULL); if( conshdlr->consresprop != NULL ) { /* start timing */ SCIPclockStart(conshdlr->resproptime, set); SCIP_CALL( conshdlr->consresprop(set->scip, conshdlr, cons, infervar, inferinfo, inferboundtype, bdchgidx, relaxedbd, result) ); /* stop timing */ SCIPclockStop(conshdlr->resproptime, set); /* update statistics */ conshdlr->nrespropcalls++; /* check result code */ if( *result != SCIP_SUCCESS && *result != SCIP_DIDNOTFIND ) { SCIPerrorMessage("propagation conflict resolving method of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } } else { SCIPerrorMessage("propagation conflict resolving method of constraint handler <%s> is not implemented\n", conshdlr->name); return SCIP_PLUGINNOTFOUND; } return SCIP_OKAY; } /** adds given values to lock status of the constraint and updates the locks of the given locktype of the involved variables */ SCIP_RETCODE SCIPconsAddLocks( SCIP_CONS* cons, /**< constraint */ SCIP_SET* set, /**< global SCIP settings */ SCIP_LOCKTYPE locktype, /**< type of variable locks */ int nlockspos, /**< increase in number of rounding locks for constraint */ int nlocksneg /**< increase in number of rounding locks for constraint's negation */ ) { int oldnlockspos; int oldnlocksneg; int updlockpos; int updlockneg; assert(cons != NULL); assert(cons->conshdlr != NULL); assert(cons->conshdlr->conslock != NULL); assert((int)locktype >= 0 && (int)locktype < (int)NLOCKTYPES); /*lint !e685 !e568 !e587 !e650*/ assert(cons->nlockspos[locktype] >= 0); assert(cons->nlocksneg[locktype] >= 0); assert(-2 <= nlockspos && nlockspos <= 2); assert(-2 <= nlocksneg && nlocksneg <= 2); assert(set != NULL); assert(cons->scip == set->scip); /* update the rounding locks */ oldnlockspos = cons->nlockspos[locktype]; oldnlocksneg = cons->nlocksneg[locktype]; cons->nlockspos[locktype] += nlockspos; cons->nlocksneg[locktype] += nlocksneg; assert(cons->nlockspos[locktype] >= 0); assert(cons->nlocksneg[locktype] >= 0); /* check, if the constraint switched from unlocked to locked, or from locked to unlocked */ updlockpos = (int)(cons->nlockspos[locktype] > 0) - (int)(oldnlockspos > 0); updlockneg = (int)(cons->nlocksneg[locktype] > 0) - (int)(oldnlocksneg > 0); /* lock the variables, if the constraint switched from unlocked to locked or from locked to unlocked */ if( updlockpos != 0 || updlockneg != 0 ) { SCIP_CALL( cons->conshdlr->conslock(set->scip, cons->conshdlr, cons, locktype, updlockpos, updlockneg) ); } return SCIP_OKAY; } /** checks single constraint for feasibility of the given solution */ SCIP_RETCODE SCIPconsCheck( SCIP_CONS* cons, /**< constraint to check */ SCIP_SET* set, /**< global SCIP settings */ SCIP_SOL* sol, /**< primal CIP solution */ SCIP_Bool checkintegrality, /**< Has integrality to be checked? */ SCIP_Bool checklprows, /**< Do constraints represented by rows in the current LP have to be checked? */ SCIP_Bool printreason, /**< Should the reason for the violation be printed? */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); assert(result != NULL); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ assert(conshdlr->conscheck != NULL); SCIP_CALL( conshdlr->conscheck(set->scip, conshdlr, &cons, 1, sol, checkintegrality, checklprows, printreason, FALSE, result) ); SCIPsetDebugMsg(set, " -> checking returned result <%d>\n", *result); if( *result != SCIP_INFEASIBLE && *result != SCIP_FEASIBLE ) { SCIPerrorMessage("feasibility check of constraint handler <%s> on constraint <%s> returned invalid result <%d>\n", conshdlr->name, cons->name, *result); return SCIP_INVALIDRESULT; } return SCIP_OKAY; } /** enforces single constraint for a given pseudo solution */ SCIP_RETCODE SCIPconsEnfops( SCIP_CONS* cons, /**< constraint to enforce */ SCIP_SET* set, /**< global SCIP settings */ SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */ SCIP_Bool objinfeasible, /**< is the solution infeasible anyway due to violating lower objective bound? */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); assert(result != NULL); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ assert(conshdlr->consenfops != NULL); SCIP_CALL( conshdlr->consenfops(set->scip, conshdlr, &cons, 1, 1, solinfeasible, objinfeasible, result) ); SCIPsetDebugMsg(set, " -> enfops returned result <%d>\n", *result); if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_BRANCHED && *result != SCIP_SOLVELP && *result != SCIP_INFEASIBLE && *result != SCIP_FEASIBLE && *result != SCIP_DIDNOTRUN ) { SCIPerrorMessage("enforcing method of constraint handler <%s> for pseudo solutions returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } /* do not update statistics */ return SCIP_OKAY; } /** enforces single constraint for a given LP solution */ SCIP_RETCODE SCIPconsEnfolp( SCIP_CONS* cons, /**< constraint to enforce */ SCIP_SET* set, /**< global SCIP settings */ SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); assert(result != NULL); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ assert(conshdlr->consenfolp != NULL); SCIP_CALL( conshdlr->consenfolp(set->scip, conshdlr, &cons, 1, 1, solinfeasible, result) ); SCIPsetDebugMsg(set, " -> enfolp returned result <%d>\n", *result); if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_BRANCHED && *result != SCIP_SEPARATED && *result != SCIP_INFEASIBLE && *result != SCIP_FEASIBLE) { SCIPerrorMessage("enforcing method of constraint handler <%s> for LP returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } /* do not update statistics */ return SCIP_OKAY; } /** enforces single constraint for a given relaxation solution */ SCIP_RETCODE SCIPconsEnforelax( SCIP_CONS* cons, /**< constraint to enforce */ SCIP_SET* set, /**< global SCIP settings */ SCIP_SOL* sol, /**< solution to be enforced */ SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); assert(sol != NULL); assert(result != NULL); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ assert(conshdlr->consenfolp != NULL); SCIP_CALL( conshdlr->consenforelax(set->scip, sol, conshdlr, &cons, 1, 1, solinfeasible, result) ); SCIPdebugMessage(" -> enforelax returned result <%d>\n", *result); if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_BRANCHED && *result != SCIP_SEPARATED && *result != SCIP_INFEASIBLE && *result != SCIP_FEASIBLE) { SCIPerrorMessage("enforcing method of constraint handler <%s> for relaxation returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } /* do not update statistics */ return SCIP_OKAY; } /** calls LP initialization method for single constraint */ SCIP_RETCODE SCIPconsInitlp( SCIP_CONS* cons, /**< constraint to initialize */ SCIP_SET* set, /**< global SCIP settings */ SCIP_Bool* infeasible /**< pointer to store whether infeasibility was detected while building the LP */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(infeasible != NULL); assert(cons->scip == set->scip); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ if( conshdlr->consinitlp != NULL ) { SCIP_CALL( conshdlr->consinitlp(set->scip, conshdlr, &cons, 1, infeasible) ); } return SCIP_OKAY; } /** calls separation method of single constraint for LP solution */ SCIP_RETCODE SCIPconsSepalp( SCIP_CONS* cons, /**< constraint to separate */ SCIP_SET* set, /**< global SCIP settings */ SCIP_RESULT* result /**< pointer to store the result of the separation call */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); assert(result != NULL); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ if( conshdlr->conssepalp != NULL ) { SCIP_CALL( conshdlr->conssepalp(set->scip, conshdlr, &cons, 1, 1, result) ); SCIPsetDebugMsg(set, " -> sepalp returned result <%d>\n", *result); if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_SEPARATED && *result != SCIP_NEWROUND && *result != SCIP_DIDNOTFIND && *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED ) { SCIPerrorMessage("separation method of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } } return SCIP_OKAY; } /** calls separation method of single constraint for given primal solution */ SCIP_RETCODE SCIPconsSepasol( SCIP_CONS* cons, /**< constraint to separate */ SCIP_SET* set, /**< global SCIP settings */ SCIP_SOL* sol, /**< primal solution that should be separated */ SCIP_RESULT* result /**< pointer to store the result of the separation call */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); assert(sol != NULL); assert(result != NULL); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ if( conshdlr->conssepasol != NULL ) { SCIP_CALL( conshdlr->conssepasol(set->scip, conshdlr, &cons, 1, 1, sol, result) ); SCIPsetDebugMsg(set, " -> sepasol returned result <%d>\n", *result); if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_SEPARATED && *result != SCIP_NEWROUND && *result != SCIP_DIDNOTFIND && *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED ) { SCIPerrorMessage("separation method of constraint handler for arbitrary primal solution <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } } return SCIP_OKAY; } /** calls domain propagation method of single constraint */ SCIP_RETCODE SCIPconsProp( SCIP_CONS* cons, /**< constraint to propagate */ SCIP_SET* set, /**< global SCIP settings */ SCIP_PROPTIMING proptiming, /**< current point in the node solving loop */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); assert(result != NULL); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ if( conshdlr->consprop != NULL ) { SCIP_CALL( conshdlr->consprop(set->scip, conshdlr, &cons, 1, 1, 1, proptiming, result) ); SCIPsetDebugMsg(set, " -> prop returned result <%d>\n", *result); if( *result != SCIP_CUTOFF && *result != SCIP_CONSADDED && *result != SCIP_REDUCEDDOM && *result != SCIP_DIDNOTFIND && *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED ) { SCIPerrorMessage("propagation method of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } } return SCIP_OKAY; } /** resolves propagation conflict of single constraint */ SCIP_RETCODE SCIPconsResprop( SCIP_CONS* cons, /**< constraint to resolve conflict for */ SCIP_SET* set, /**< global SCIP settings */ SCIP_VAR* infervar, /**< the conflict variable whose bound change has to be resolved */ int inferinfo, /**< the user information passed to the corresponding SCIPinferVarLbCons() or SCIPinferVarUbCons() call */ SCIP_BOUNDTYPE boundtype, /**< the type of the changed bound (lower or upper bound) */ SCIP_BDCHGIDX* bdchgidx, /**< the index of the bound change, representing the point of time where the change took place */ SCIP_Real relaxedbd, /**< the relaxed bound which is sufficient to be explained */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); assert(result != NULL); assert(infervar != NULL); assert(bdchgidx != NULL); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ if( conshdlr->consresprop != NULL ) { SCIP_CALL( conshdlr->consresprop(set->scip, conshdlr, cons, infervar, inferinfo, boundtype, bdchgidx, relaxedbd, result) ); SCIPsetDebugMsg(set, " -> resprop returned result <%d>\n", *result); if( *result != SCIP_SUCCESS && *result != SCIP_DIDNOTFIND ) { SCIPerrorMessage("propagation conflict resolving method of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } } return SCIP_OKAY; } /** presolves single constraint */ SCIP_RETCODE SCIPconsPresol( SCIP_CONS* cons, /**< constraint to presolve */ SCIP_SET* set, /**< global SCIP settings */ int nrounds, /**< number of presolving rounds already done */ SCIP_PRESOLTIMING timing, /**< current presolving timing */ int nnewfixedvars, /**< number of variables fixed since the last call to the presolving method */ int nnewaggrvars, /**< number of variables aggregated since the last call to the presolving method */ int nnewchgvartypes, /**< number of variable type changes since the last call to the presolving method */ int nnewchgbds, /**< number of variable bounds tightened since the last call to the presolving method */ int nnewholes, /**< number of domain holes added since the last call to the presolving method */ int nnewdelconss, /**< number of deleted constraints since the last call to the presolving method */ int nnewaddconss, /**< number of added constraints since the last call to the presolving method */ int nnewupgdconss, /**< number of upgraded constraints since the last call to the presolving method */ int nnewchgcoefs, /**< number of changed coefficients since the last call to the presolving method */ int nnewchgsides, /**< number of changed left or right hand sides since the last call to the presolving method */ int* nfixedvars, /**< pointer to count total number of variables fixed of all presolvers */ int* naggrvars, /**< pointer to count total number of variables aggregated of all presolvers */ int* nchgvartypes, /**< pointer to count total number of variable type changes of all presolvers */ int* nchgbds, /**< pointer to count total number of variable bounds tightened of all presolvers */ int* naddholes, /**< pointer to count total number of domain holes added of all presolvers */ int* ndelconss, /**< pointer to count total number of deleted constraints of all presolvers */ int* naddconss, /**< pointer to count total number of added constraints of all presolvers */ int* nupgdconss, /**< pointer to count total number of upgraded constraints of all presolvers */ int* nchgcoefs, /**< pointer to count total number of changed coefficients of all presolvers */ int* nchgsides, /**< pointer to count total number of changed left/right hand sides of all presolvers */ SCIP_RESULT* result /**< pointer to store the result of the callback method */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); assert(nfixedvars != NULL); assert(naggrvars != NULL); assert(nchgvartypes != NULL); assert(nchgbds != NULL); assert(naddholes != NULL); assert(ndelconss != NULL); assert(naddconss != NULL); assert(nupgdconss != NULL); assert(nchgcoefs != NULL); assert(nchgsides != NULL); assert(result != NULL); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ if( conshdlr->conspresol != NULL ) { SCIP_CALL( conshdlr->conspresol(set->scip, conshdlr, &cons, 1, nrounds, timing, nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes, nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, nfixedvars, naggrvars, nchgvartypes, nchgbds, naddholes, ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides, result) ); SCIPsetDebugMsg(set, " -> presol returned result <%d>\n", *result); if( *result != SCIP_UNBOUNDED && *result != SCIP_CUTOFF && *result != SCIP_SUCCESS && *result != SCIP_DIDNOTFIND && *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED ) { SCIPerrorMessage("presolving method of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result); return SCIP_INVALIDRESULT; } } return SCIP_OKAY; } /** calls constraint activation notification method of single constraint */ SCIP_RETCODE SCIPconsActive( SCIP_CONS* cons, /**< constraint to notify */ SCIP_SET* set /**< global SCIP settings */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ if( conshdlr->consactive != NULL ) { SCIP_CALL( conshdlr->consactive(set->scip, conshdlr, cons) ); } return SCIP_OKAY; } /** calls constraint deactivation notification method of single constraint */ SCIP_RETCODE SCIPconsDeactive( SCIP_CONS* cons, /**< constraint to notify */ SCIP_SET* set /**< global SCIP settings */ ) { SCIP_CONSHDLR* conshdlr; assert(cons != NULL); assert(set != NULL); assert(cons->scip == set->scip); conshdlr = cons->conshdlr; assert(conshdlr != NULL); /* call external method */ if( conshdlr->consdeactive != NULL ) { SCIP_CALL( conshdlr->consdeactive(set->scip, conshdlr, cons) ); } return SCIP_OKAY; } /* * Hash functions */ /** gets the key (i.e. the name) of the given constraint */ SCIP_DECL_HASHGETKEY(SCIPhashGetKeyCons) { /*lint --e{715}*/ SCIP_CONS* cons = (SCIP_CONS*)elem; assert(cons != NULL); return cons->name; } /* * method for arrays of contraint handlers */ /** ensures size of storage for propagable constraints with a minimum size of num */ static SCIP_RETCODE ensurePropagationStorage( SCIP_SET* set, /**< global SCIP settings */ SCIP_CONSHDLR* conshdlr, /**< constraint handler */ int num /**< minimum number of entries to store */ ) { assert(set != NULL); assert(conshdlr != NULL); if( num > conshdlr->storedpropconsssize ) { int newsize; newsize = SCIPsetCalcMemGrowSize(set, num); SCIP_ALLOC( BMSreallocMemoryArray(&(conshdlr->storedpropconss), newsize) ); conshdlr->storedpropconsssize = newsize; } assert(num <= conshdlr->storedpropconsssize); return SCIP_OKAY; } /** stores all constraints marked for propagation away when probing is started */ SCIP_RETCODE SCIPconshdlrsStorePropagationStatus( SCIP_SET* set, /**< global SCIP settings */ SCIP_CONSHDLR** conshdlrs, /**< all constraint handlers */ int nconshdlrs /**< number of contraint handlers */ ) { SCIP_CONSHDLR* conshdlr; int c; assert(set != NULL); assert(conshdlrs != NULL || nconshdlrs == 0); for( c = nconshdlrs - 1; c >= 0; --c ) { conshdlr = conshdlrs[c]; /*lint !e613*/ assert(conshdlr != NULL); assert(conshdlr->storednmarkedpropconss == 0); if( conshdlr->nmarkedpropconss > 0 ) { int v; SCIP_CALL( ensurePropagationStorage(set, conshdlr, conshdlr->nmarkedpropconss) ); BMScopyMemoryArray(conshdlr->storedpropconss, conshdlr->propconss, conshdlr->nmarkedpropconss); conshdlr->storednmarkedpropconss = conshdlr->nmarkedpropconss; conshdlr->storedpropdomchgcount = conshdlr->lastpropdomchgcount; for( v = conshdlr->storednmarkedpropconss - 1; v >= 0; --v ) { SCIPconsCapture(conshdlr->storedpropconss[v]); } /* assert(conshdlr->nmarkedpropconss == 0); this assert does not hold if updates are delayed */ } } return SCIP_OKAY; } /** reset all constraints marked for propagation when probing was finished */ SCIP_RETCODE SCIPconshdlrsResetPropagationStatus( SCIP_SET* set, /**< global SCIP settings */ BMS_BLKMEM* blkmem, /**< block memory */ SCIP_CONSHDLR** conshdlrs, /**< all constraint handlers */ int nconshdlrs /**< number of contraint handlers */ ) { SCIP_CONSHDLR* conshdlr; int c; assert(set != NULL); assert(blkmem != NULL); assert(conshdlrs != NULL || nconshdlrs == 0); for( c = nconshdlrs - 1; c >= 0; --c ) { conshdlr = conshdlrs[c]; /*lint !e613*/ assert(conshdlr != NULL); if( conshdlr->storednmarkedpropconss > 0 ) { #ifndef NDEBUG int ndisabled = 0; #endif int v; for( v = conshdlr->nmarkedpropconss - 1; v >= 0; --v ) { SCIP_CALL( SCIPconsUnmarkPropagate(conshdlr->propconss[v], set) ); } /* mark all previously marked constraint, which were marked before probing */ for( v = 0; v < conshdlr->storednmarkedpropconss; ++v ) { SCIP_CONS* cons = conshdlr->storedpropconss[v]; assert(cons != NULL); if( cons->enabled && cons->propagate && cons->propenabled ) { SCIP_CALL( SCIPconsMarkPropagate(cons, set) ); } #ifndef NDEBUG else ++ndisabled; #endif SCIP_CALL( SCIPconsRelease(&cons, blkmem, set) ); } /*lint !e438*/ assert(conshdlr->storednmarkedpropconss - ndisabled <= conshdlr->npropconss); assert(conshdlr->nmarkedpropconss + ndisabled >= conshdlr->storednmarkedpropconss || (conshdlrAreUpdatesDelayed(conshdlr) && conshdlr->nupdateconss + ndisabled >= conshdlr->storednmarkedpropconss)); conshdlr->lastpropdomchgcount = conshdlr->storedpropdomchgcount; conshdlr->storednmarkedpropconss = 0; } } return SCIP_OKAY; } /** create linear constraint statistics */ SCIP_RETCODE SCIPlinConsStatsCreate( SCIP* scip, /**< scip data structure */ SCIP_LINCONSSTATS** linconsstats /**< pointer to linear constraint classification statistics */ ) { assert(linconsstats != NULL); SCIP_CALL( SCIPallocBlockMemory(scip, linconsstats) ); return SCIP_OKAY; } /** free linear constraint statistics */ void SCIPlinConsStatsFree( SCIP* scip, /**< scip data structure */ SCIP_LINCONSSTATS** linconsstats /**< pointer to linear constraint classification statistics */ ) { assert(linconsstats != NULL); assert(*linconsstats != NULL); SCIPfreeBlockMemory(scip, linconsstats); } /** resets linear constraint statistics */ void SCIPlinConsStatsReset( SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */ ) { BMSclearMemoryArray(linconsstats->counter, SCIP_NLINCONSTYPES); linconsstats->sum = 0; } /** returns the number of occurrences of a specific type of linear constraint */ int SCIPlinConsStatsGetTypeCount( SCIP_LINCONSSTATS* linconsstats, /**< linear constraint classification statistics */ SCIP_LINCONSTYPE linconstype /**< linear constraint type */ ) { assert(linconsstats != NULL); assert(0 <= (int)linconstype && (int)linconstype < SCIP_NLINCONSTYPES); /*lint !e587 !e685 !e568*/ assert(linconsstats->counter != NULL); return linconsstats->counter[(int)linconstype]; } /** returns the total number of classified constraints */ int SCIPlinConsStatsGetSum( SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */ ) { assert(linconsstats != NULL); return linconsstats->sum; } /** increases the number of occurrences of a specific type of linear constraint */ void SCIPlinConsStatsIncTypeCount( SCIP_LINCONSSTATS* linconsstats, /**< linear constraint classification statistics */ SCIP_LINCONSTYPE linconstype, /**< linear constraint type */ int increment /**< positive increment */ ) { assert(linconsstats != NULL); assert(increment >= 1); assert(0 <= (int)linconstype && (int)linconstype < SCIP_NLINCONSTYPES); /*lint !e587 !e685 !e568*/ assert(linconsstats->counter != NULL); linconsstats->counter[(int)linconstype] += increment; linconsstats->sum += increment; } /** print linear constraint classification statistics */ void SCIPprintLinConsStats( SCIP* scip, /**< scip data structure */ FILE* file, /**< file handle or NULL to print to standard out */ SCIP_LINCONSSTATS* linconsstats /**< linear constraint classification statistics */ ) { assert(scip != NULL); assert(linconsstats != NULL); /* print statistics */ SCIPinfoMessage(scip, file, "\n"); SCIPinfoMessage(scip, file, "%-19s : %10s\n", "Linear cons types", "count"); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "total", SCIPlinConsStatsGetSum(linconsstats)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "empty", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_EMPTY)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "free", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_FREE)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "singleton", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_SINGLETON)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "aggregation", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_AGGREGATION)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "precedence", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_PRECEDENCE)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "varbound", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_VARBOUND)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "setpartition", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_SETPARTITION)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "setpacking", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_SETPACKING)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "setcovering", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_SETCOVERING)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "cardinality", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_CARDINALITY)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "invknapsack", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_INVKNAPSACK)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "eqknapsack", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_EQKNAPSACK)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "binpacking", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_BINPACKING)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "knapsack", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_KNAPSACK)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "intknapsack", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_INTKNAPSACK)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "mixedbinary", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_MIXEDBINARY)); SCIPinfoMessage(scip, file, " %-17s : %10d\n", "general", SCIPlinConsStatsGetTypeCount(linconsstats, SCIP_LINCONSTYPE_GENERAL)); SCIPinfoMessage(scip, file, "\n"); } /* * simple functions implemented as defines */ /* In debug mode, the following methods are implemented as function calls to ensure * type validity. * In optimized mode, the methods are implemented as defines to improve performance. * However, we want to have them in the library anyways, so we have to undef the defines. */ #undef SCIPconsGetName #undef SCIPconsGetPos #undef SCIPconsGetHdlr #undef SCIPconsGetData #undef SCIPconsGetNUses #undef SCIPconsGetActiveDepth #undef SCIPconsGetValidDepth #undef SCIPconsIsActive #undef SCIPconsIsEnabled #undef SCIPconsIsSeparationEnabled #undef SCIPconsIsPropagationEnabled #undef SCIPconsIsDeleted #undef SCIPconsIsObsolete #undef SCIPconsIsConflict #undef SCIPconsGetAge #undef SCIPconsIsInitial #undef SCIPconsIsSeparated #undef SCIPconsIsEnforced #undef SCIPconsIsChecked #undef SCIPconsIsMarkedPropagate #undef SCIPconsIsPropagated #undef SCIPconsIsGlobal #undef SCIPconsIsLocal #undef SCIPconsIsModifiable #undef SCIPconsIsDynamic #undef SCIPconsIsRemovable #undef SCIPconsIsStickingAtNode #undef SCIPconsIsInProb #undef SCIPconsIsOriginal #undef SCIPconsIsTransformed #undef SCIPconsIsLockedPos #undef SCIPconsIsLockedNeg #undef SCIPconsIsLocked #undef SCIPconsGetNLocksPos #undef SCIPconsGetNLocksNeg #undef SCIPconsIsLockedTypePos #undef SCIPconsIsLockedTypeNeg #undef SCIPconsIsLockedType #undef SCIPconsGetNLocksTypePos #undef SCIPconsGetNLocksTypeNeg #undef SCIPconsIsAdded #undef SCIPconsGetNUpgradeLocks /** returns the name of the constraint * * @note to change the name of a constraint, use SCIPchgConsName() from scip.h */ const char* SCIPconsGetName( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->name; } /** returns the position of constraint in the corresponding handler's conss array */ int SCIPconsGetPos( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->consspos; } /** returns the constraint handler of the constraint */ SCIP_CONSHDLR* SCIPconsGetHdlr( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->conshdlr; } /** returns the constraint data field of the constraint */ SCIP_CONSDATA* SCIPconsGetData( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->consdata; } /** gets number of times, the constraint is currently captured */ int SCIPconsGetNUses( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->nuses; } /** for an active constraint, returns the depth in the tree at which the constraint was activated */ int SCIPconsGetActiveDepth( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); assert(SCIPconsIsActive(cons)); return cons->activedepth; } /** returns TRUE iff constraint is active in the current node */ SCIP_Bool SCIPconsIsActive( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->updateactivate || (cons->active && !cons->updatedeactivate); } /** returns TRUE iff constraint is active in the current node */ SCIP_Bool SCIPconsIsUpdatedeactivate( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->updatedeactivate; } /** returns the depth in the tree at which the constraint is valid; returns INT_MAX, if the constraint is local * and currently not active */ int SCIPconsGetValidDepth( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); assert(cons->validdepth == 0 || cons->local); return (!cons->local ? 0 : !SCIPconsIsActive(cons) ? INT_MAX : cons->validdepth == -1 ? SCIPconsGetActiveDepth(cons) : cons->validdepth); } /** returns TRUE iff constraint is enabled in the current node */ SCIP_Bool SCIPconsIsEnabled( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->updateenable || (cons->enabled && !cons->updatedisable); } /** returns TRUE iff constraint's separation is enabled in the current node */ SCIP_Bool SCIPconsIsSeparationEnabled( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return SCIPconsIsEnabled(cons) && (cons->updatesepaenable || (cons->sepaenabled && !cons->updatesepadisable)); } /** returns TRUE iff constraint's propagation is enabled in the current node */ SCIP_Bool SCIPconsIsPropagationEnabled( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return SCIPconsIsEnabled(cons) && (cons->updatepropenable || (cons->propenabled && !cons->updatepropdisable)); } /** returns TRUE iff constraint is deleted or marked to be deleted */ SCIP_Bool SCIPconsIsDeleted( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->deleted; } /** returns TRUE iff constraint is marked obsolete */ SCIP_Bool SCIPconsIsObsolete( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->updateobsolete || cons->obsolete; } /** returns TRUE iff constraint is marked as a conflict */ SCIP_Bool SCIPconsIsConflict( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->conflict; } /** gets age of constraint */ SCIP_Real SCIPconsGetAge( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->age; } /** returns TRUE iff the LP relaxation of constraint should be in the initial LP */ SCIP_Bool SCIPconsIsInitial( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->initial; } /** returns TRUE iff constraint should be separated during LP processing */ SCIP_Bool SCIPconsIsSeparated( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->separate; } /** returns TRUE iff constraint should be enforced during node processing */ SCIP_Bool SCIPconsIsEnforced( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->enforce; } /** returns TRUE iff constraint should be checked for feasibility */ SCIP_Bool SCIPconsIsChecked( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->check; } /** returns whether the constraint is marked for propagation */ SCIP_Bool SCIPconsIsMarkedPropagate( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return (cons->updatemarkpropagate || (cons->markpropagate && !cons->updateunmarkpropagate)); } /** returns TRUE iff constraint should be propagated during node processing */ SCIP_Bool SCIPconsIsPropagated( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->propagate; } /** returns TRUE iff constraint is globally valid */ SCIP_Bool SCIPconsIsGlobal( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return !cons->local; } /** returns TRUE iff constraint is only locally valid or not added to any (sub)problem */ SCIP_Bool SCIPconsIsLocal( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->local; } /** returns TRUE iff constraint is modifiable (subject to column generation) */ SCIP_Bool SCIPconsIsModifiable( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->modifiable; } /** returns TRUE iff constraint is subject to aging */ SCIP_Bool SCIPconsIsDynamic( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->dynamic; } /** returns TRUE iff constraint's relaxation should be removed from the LP due to aging or cleanup */ SCIP_Bool SCIPconsIsRemovable( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->removable; } /** returns TRUE iff constraint's relaxation should be removed from the LP due to aging or cleanup */ SCIP_Bool SCIPconsIsStickingAtNode( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->stickingatnode; } /** returns TRUE iff constraint belongs to the global problem */ SCIP_Bool SCIPconsIsInProb( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return (cons->addconssetchg == NULL && cons->addarraypos >= 0); } /** returns TRUE iff constraint is belonging to original space */ SCIP_Bool SCIPconsIsOriginal( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->original; } /** returns TRUE iff constraint is belonging to transformed space */ SCIP_Bool SCIPconsIsTransformed( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return !cons->original; } /** returns TRUE iff roundings for variables in constraint are locked */ SCIP_Bool SCIPconsIsLockedPos( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return (cons->nlockspos[SCIP_LOCKTYPE_MODEL] > 0); } /** returns TRUE iff roundings for variables in constraint's negation are locked */ SCIP_Bool SCIPconsIsLockedNeg( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return (cons->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0); } /** returns TRUE iff roundings for variables in constraint or in constraint's negation are locked */ SCIP_Bool SCIPconsIsLocked( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return (cons->nlockspos[SCIP_LOCKTYPE_MODEL] > 0 || cons->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0); } /** get number of times the roundings for variables in constraint are locked */ int SCIPconsGetNLocksPos( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->nlockspos[SCIP_LOCKTYPE_MODEL]; } /** get number of times the roundings for variables in constraint's negation are locked */ int SCIPconsGetNLocksNeg( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return cons->nlocksneg[SCIP_LOCKTYPE_MODEL]; } /** returns TRUE iff roundings of the given locktype for variables in constraint are locked */ SCIP_Bool SCIPconsIsLockedTypePos( SCIP_CONS* cons, /**< constraint */ SCIP_LOCKTYPE locktype /**< variable lock type */ ) { assert(cons != NULL); assert((int)locktype >= 0 && (int)locktype < (int)NLOCKTYPES); /*lint !e685 !e568 !e587 !e650*/ return (cons->nlockspos[locktype] > 0); } /** returns TRUE iff roundings of the given locktype for variables in constraint are locked */ SCIP_Bool SCIPconsIsLockedTypeNeg( SCIP_CONS* cons, /**< constraint */ SCIP_LOCKTYPE locktype /**< variable lock type */ ) { assert(cons != NULL); assert((int)locktype >= 0 && (int)locktype < (int)NLOCKTYPES); /*lint !e685 !e568 !e587 !e650*/ return (cons->nlocksneg[locktype] > 0); } /** returns TRUE iff roundings of given locktype for variables in constraint or in constraint's negation are locked */ SCIP_Bool SCIPconsIsLockedType( SCIP_CONS* cons, /**< constraint */ SCIP_LOCKTYPE locktype /**< variable lock type */ ) { assert(cons != NULL); assert((int)locktype >= 0 && (int)locktype < (int)NLOCKTYPES); /*lint !e685 !e568 !e587 !e650*/ return (cons->nlockspos[locktype] > 0 || cons->nlocksneg[locktype] > 0); } /** get number of times the roundings of given locktype for variables in constraint are locked */ int SCIPconsGetNLocksTypePos( SCIP_CONS* cons, /**< constraint */ SCIP_LOCKTYPE locktype /**< variable lock type */ ) { assert(cons != NULL); assert((int)locktype >= 0 && (int)locktype < (int)NLOCKTYPES); /*lint !e685 !e568 !e587 !e650*/ return cons->nlockspos[locktype]; } /** get number of times the roundings of given locktype for variables in constraint's negation are locked */ int SCIPconsGetNLocksTypeNeg( SCIP_CONS* cons, /**< constraint */ SCIP_LOCKTYPE locktype /**< variable lock type */ ) { assert(cons != NULL); assert((int)locktype >= 0 && (int)locktype < (int)NLOCKTYPES); /*lint !e685 !e568 !e587 !e650*/ return cons->nlocksneg[locktype]; } /** returns if the constraint was already added to a SCIP instance */ SCIP_Bool SCIPconsIsAdded( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return (cons->addarraypos >= 0); } /** adds locks to (dis-)allow upgrading of constraint */ void SCIPconsAddUpgradeLocks( SCIP_CONS* cons, /**< constraint to add locks */ int nlocks /**< number of locks to add */ ) { assert(cons != NULL); assert(cons->nupgradelocks < (1 << 28) - nlocks); /*lint !e574*/ cons->nupgradelocks += (unsigned int) nlocks; } /** gets number of locks against upgrading the constraint, 0 means this constraint can be upgraded */ int SCIPconsGetNUpgradeLocks( SCIP_CONS* cons /**< constraint */ ) { assert(cons != NULL); return (int) cons->nupgradelocks; }
b4e796c46804c9a5b9ed71cd18f27e24083dc1ae
966bc7834320e20f92fdd02fda4952e70e824e16
/SBC/rpi-4/device_driver/driver/radioberry_gateware.h
e496f445154068630a2f548983acbdf3c9c92249
[]
no_license
pa3gsb/Radioberry-2.x
475c2e57df38eead2deaf69b10b04e91e00713e9
72e6b5a4fa972db8a89f4f8c33786caa4dab8cfa
refs/heads/master
2023-08-17T01:30:47.517298
2023-08-05T17:57:56
2023-08-05T17:57:56
95,689,838
321
64
null
2022-08-04T14:44:00
2017-06-28T16:28:43
HTML
UTF-8
C
false
false
2,221
h
radioberry_gateware.h
/** * * Loading the gateware into the FPGA. * */ #ifndef __RADIOBERRY_GATEWARE_H__ #define __RADIOBERRY_GATEWARE_H__ #include <linux/delay.h> #define iPinCONF_DONE 22 #define iPinNSTATUS 26 #define oPinNCONFIG 27 #define oPinDATA 13 #define oPinDCLK 24 static void initialize_gateware(void); static int prepare_gateware_loading(void) ; static void upload_gateware_byte( int one_byte ); static int activate_gateware(void); static void upload_gateware_byte( int one_byte ) { int bit = 0; int i = 0; /* write from LSb to MSb */ for ( i = 0; i < 8; i++ ) { bit = one_byte >> i; bit = bit & 0x1; if (bit) *rpi_set_io_high = (1<<oPinDATA); else *rpi_set_io_low = (1<<oPinDATA); *rpi_set_io_high = (1<<oPinDCLK); *rpi_set_io_low = (1<<oPinDCLK); } } static int prepare_gateware_loading() { printk(KERN_INFO "Info: prepare FPGA for loading image\n"); *rpi_set_io_low = (1<<oPinNCONFIG); *rpi_set_io_low = (1<<oPinDATA); *rpi_set_io_low = (1<<oPinDCLK); msleep(1000); *rpi_set_io_high = (1<<oPinNCONFIG); int count = 0; while ((((*rpi_read_io) >> iPinNSTATUS) & 1) == 0) { count++; msleep(1000); if (count >= 2) { printk(KERN_INFO "Error: prepareLoading failed\n"); return -1; } } return 0; } static void initialize_gateware() { initialize_gpio_for_input(rpi_io, iPinCONF_DONE); initialize_gpio_for_input(rpi_io, iPinNSTATUS); initialize_gpio_for_output(rpi_io, oPinNCONFIG); initialize_gpio_for_output(rpi_io, oPinDATA); initialize_gpio_for_output(rpi_io, oPinDCLK); printk(KERN_INFO "GPIO ready for uploading gateware...\n"); } static int activate_gateware() { /* Check if loading succeeded*/ if ((((*rpi_read_io) >> iPinNSTATUS) & 1) == 0) { printk(KERN_INFO "Error: programming failed; nstatus is low\n"); return 0; } else if ((((*rpi_read_io) >> iPinCONF_DONE) & 1) == 0) { printk(KERN_INFO "Error: programming failed; conf done is low\n"); return 0; } /* Initialize device */ *rpi_set_io_high = (1<<oPinDCLK); *rpi_set_io_low = (1<<oPinDCLK); *rpi_set_io_high = (1<<oPinDCLK); *rpi_set_io_low = (1<<oPinDCLK); printk(KERN_INFO "Info: gateware upload and activation succeeded\n"); return 0; } #endif
1e0c66c30d140c5b83500d988c2883b59fdef2a3
83b8b30ebb633eecd29ca0a7a20cc43a293c9333
/ports/espressif/common-hal/frequencyio/__init__.c
487814bd076b200495ab3469969a69467701e35e
[ "GPL-1.0-or-later", "MIT" ]
permissive
adafruit/circuitpython
430ec895149d1eb814b505db39b4977a35ee88a7
506dca71b0cbb7af749bb51f86b01021db5483b3
refs/heads/main
2023-08-21T16:30:46.781068
2023-08-20T00:39:44
2023-08-20T00:39:44
66,166,069
3,806
1,560
MIT
2023-09-14T19:23:51
2016-08-20T20:10:40
C
UTF-8
C
false
false
36
c
__init__.c
// No ferquencyio module functions.
4752313a154bf8000f484a8166aab359ac2077e1
99bdb3251fecee538e0630f15f6574054dfc1468
/bsp/imx6sx/iMX6_Platform_SDK/board/mx6dq/sabre_ai/rev_b_iomux/gpmi_iomux_config.c
9b80feac53c3677f35660db45d5016e3932e78e4
[ "Apache-2.0", "Zlib", "LicenseRef-scancode-proprietary-license", "MIT", "BSD-3-Clause", "X11", "BSD-4-Clause-UC", "LicenseRef-scancode-unknown-license-reference" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
56,466
c
gpmi_iomux_config.c
/* * Copyright (c) 2012, Freescale Semiconductor, Inc. * All rights reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // File: gpmi_iomux_config.c /* ------------------------------------------------------------------------------ * <auto-generated> * This code was generated by a tool. * Runtime Version:3.4.0.0 * * Changes to this file may cause incorrect behavior and will be lost if * the code is regenerated. * </auto-generated> * ------------------------------------------------------------------------------ */ #include "iomux_config.h" #include "registers/regsiomuxc.h" // Function to configure IOMUXC for gpmi module. void gpmi_iomux_config(void) { // Config gpmi.NAND_ALE to pad NAND_ALE(A16) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_ALE_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_ALE_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_ALE(0x020E02D8) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_ALE // ALT1 (1) - Select instance: usdhc4 signal: SD4_RESET // ALT5 (5) - Select instance: gpio6 signal: GPIO6_IO08 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_ALE_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_ALE_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_ALE_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_ALE(0x020E06C0) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_ALE_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_ALE_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_ALE_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_ALE_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_ALE_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_ALE_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_ALE_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_ALE_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_ALE_SRE_V(SLOW)); // Config gpmi.NAND_CE0_B to pad NAND_CS0_B(F15) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_CS0_B_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_CS0_B(0x020E02E4) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_CE0_B // ALT5 (5) - Select instance: gpio6 signal: GPIO6_IO11 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_CS0_B_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_CS0_B_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_CS0_B_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B(0x020E06CC) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B_SRE_V(SLOW)); // Config gpmi.NAND_CE1_B to pad NAND_CS1_B(C16) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_CS1_B_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_CS1_B(0x020E02E8) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_CE1_B // ALT1 (1) - Select instance: usdhc4 signal: SD4_VSELECT // ALT2 (2) - Select instance: usdhc3 signal: SD3_VSELECT // ALT5 (5) - Select instance: gpio6 signal: GPIO6_IO14 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_CS1_B_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_CS1_B_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_CS1_B_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B(0x020E06D0) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B_SRE_V(SLOW)); // Config gpmi.NAND_CLE to pad NAND_CLE(C15) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_CLE_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_CLE_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_CLE(0x020E02D4) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_CLE // ALT1 (1) - Select instance: ipu2 signal: IPU2_SISG4 // ALT5 (5) - Select instance: gpio6 signal: GPIO6_IO07 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_CLE_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_CLE_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_CLE_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_CLE(0x020E06BC) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_CLE_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CLE_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CLE_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CLE_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CLE_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CLE_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CLE_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CLE_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_CLE_SRE_V(SLOW)); // Config gpmi.NAND_DATA00 to pad NAND_DATA00(A18) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA00_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_DATA00(0x020E02FC) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_DATA00 // ALT1 (1) - Select instance: usdhc1 signal: SD1_DATA4 // ALT5 (5) - Select instance: gpio2 signal: GPIO2_IO00 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA00_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA00_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA00_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00(0x020E06E4) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00_SRE_V(SLOW)); // Config gpmi.NAND_DATA01 to pad NAND_DATA01(C17) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA01_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_DATA01(0x020E0300) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_DATA01 // ALT1 (1) - Select instance: usdhc1 signal: SD1_DATA5 // ALT5 (5) - Select instance: gpio2 signal: GPIO2_IO01 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA01_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA01_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA01_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01(0x020E06E8) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01_SRE_V(SLOW)); // Config gpmi.NAND_DATA02 to pad NAND_DATA02(F16) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA02_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_DATA02(0x020E0304) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_DATA02 // ALT1 (1) - Select instance: usdhc1 signal: SD1_DATA6 // ALT5 (5) - Select instance: gpio2 signal: GPIO2_IO02 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA02_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA02_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA02_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02(0x020E06EC) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_SRE_V(SLOW)); // Config gpmi.NAND_DATA03 to pad NAND_DATA03(D17) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA03_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_DATA03(0x020E0308) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_DATA03 // ALT1 (1) - Select instance: usdhc1 signal: SD1_DATA7 // ALT5 (5) - Select instance: gpio2 signal: GPIO2_IO03 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA03_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA03_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA03_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03(0x020E06F0) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03_SRE_V(SLOW)); // Config gpmi.NAND_DATA04 to pad NAND_DATA04(A19) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA04_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_DATA04(0x020E030C) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_DATA04 // ALT1 (1) - Select instance: usdhc2 signal: SD2_DATA4 // ALT5 (5) - Select instance: gpio2 signal: GPIO2_IO04 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA04_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA04_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA04_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04(0x020E06F4) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04_SRE_V(SLOW)); // Config gpmi.NAND_DATA05 to pad NAND_DATA05(B18) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA05_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_DATA05(0x020E0310) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_DATA05 // ALT1 (1) - Select instance: usdhc2 signal: SD2_DATA5 // ALT5 (5) - Select instance: gpio2 signal: GPIO2_IO05 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA05_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA05_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA05_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05(0x020E06F8) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05_SRE_V(SLOW)); // Config gpmi.NAND_DATA06 to pad NAND_DATA06(E17) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA06_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_DATA06(0x020E0314) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_DATA06 // ALT1 (1) - Select instance: usdhc2 signal: SD2_DATA6 // ALT5 (5) - Select instance: gpio2 signal: GPIO2_IO06 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA06_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA06_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA06_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06(0x020E06FC) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06_SRE_V(SLOW)); // Config gpmi.NAND_DATA07 to pad NAND_DATA07(C18) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA07_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_DATA07(0x020E0318) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_DATA07 // ALT1 (1) - Select instance: usdhc2 signal: SD2_DATA7 // ALT5 (5) - Select instance: gpio2 signal: GPIO2_IO07 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA07_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA07_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_DATA07_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07(0x020E0700) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07_SRE_V(SLOW)); // Config gpmi.NAND_DQS to pad SD4_DATA0(D18) // HW_IOMUXC_SW_MUX_CTL_PAD_SD4_DATA0_WR(0x00000002); // HW_IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_SD4_DATA0(0x020E031C) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT1 (1) - Select instance: usdhc4 signal: SD4_DATA0 // ALT2 (2) - Select instance: gpmi signal: NAND_DQS // ALT5 (5) - Select instance: gpio2 signal: GPIO2_IO08 HW_IOMUXC_SW_MUX_CTL_PAD_SD4_DATA0_WR( BF_IOMUXC_SW_MUX_CTL_PAD_SD4_DATA0_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_SD4_DATA0_MUX_MODE_V(ALT2)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0(0x020E0704) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0_WR( BF_IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0_SRE_V(SLOW)); // Config gpmi.NAND_READY to pad NAND_READY(B16) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_READY_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_READY_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_READY(0x020E02E0) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_READY // ALT1 (1) - Select instance: ipu2 signal: IPU2_DI0_PIN01 // ALT5 (5) - Select instance: gpio6 signal: GPIO6_IO10 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_READY_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_READY_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_READY_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_READY(0x020E06C8) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_READY_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_READY_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_READY_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_READY_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_READY_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_READY_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_READY_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_READY_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_READY_SRE_V(SLOW)); // Config gpmi.NAND_RE_B to pad SD4_CMD(B17) // HW_IOMUXC_SW_MUX_CTL_PAD_SD4_CMD_WR(0x00000001); // HW_IOMUXC_SW_PAD_CTL_PAD_SD4_CMD_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_SD4_CMD(0x020E02F4) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: usdhc4 signal: SD4_CMD // ALT1 (1) - Select instance: gpmi signal: NAND_RE_B // ALT2 (2) - Select instance: uart3 signal: UART3_TX_DATA // ALT5 (5) - Select instance: gpio7 signal: GPIO7_IO09 HW_IOMUXC_SW_MUX_CTL_PAD_SD4_CMD_WR( BF_IOMUXC_SW_MUX_CTL_PAD_SD4_CMD_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_SD4_CMD_MUX_MODE_V(ALT1)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_SD4_CMD(0x020E06DC) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_SD4_CMD_WR( BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CMD_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CMD_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CMD_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CMD_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CMD_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CMD_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CMD_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CMD_SRE_V(SLOW)); // Config gpmi.NAND_WE_B to pad SD4_CLK(E16) // HW_IOMUXC_SW_MUX_CTL_PAD_SD4_CLK_WR(0x00000001); // HW_IOMUXC_SW_PAD_CTL_PAD_SD4_CLK_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_SD4_CLK(0x020E02F8) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: usdhc4 signal: SD4_CLK // ALT1 (1) - Select instance: gpmi signal: NAND_WE_B // ALT2 (2) - Select instance: uart3 signal: UART3_RX_DATA // ALT5 (5) - Select instance: gpio7 signal: GPIO7_IO10 HW_IOMUXC_SW_MUX_CTL_PAD_SD4_CLK_WR( BF_IOMUXC_SW_MUX_CTL_PAD_SD4_CLK_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_SD4_CLK_MUX_MODE_V(ALT1)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_SD4_CLK(0x020E06E0) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_SD4_CLK_WR( BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CLK_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CLK_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CLK_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CLK_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CLK_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CLK_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CLK_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_SD4_CLK_SRE_V(SLOW)); // Config gpmi.NAND_WP_B to pad NAND_WP_B(E15) // HW_IOMUXC_SW_MUX_CTL_PAD_NAND_WP_B_WR(0x00000000); // HW_IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B_WR(0x0001B0B0); // Mux Register: // IOMUXC_SW_MUX_CTL_PAD_NAND_WP_B(0x020E02DC) // SION [4] - Software Input On Field Reset: DISABLED // Force the selected mux mode Input path no matter of MUX_MODE functionality. // DISABLED (0) - Input Path is determined by functionality of the selected mux mode (regular). // ENABLED (1) - Force input path of pad. // MUX_MODE [2:0] - MUX Mode Select Field Reset: ALT5 // Select iomux modes to be used for pad. // ALT0 (0) - Select instance: gpmi signal: NAND_WP_B // ALT1 (1) - Select instance: ipu2 signal: IPU2_SISG5 // ALT5 (5) - Select instance: gpio6 signal: GPIO6_IO09 HW_IOMUXC_SW_MUX_CTL_PAD_NAND_WP_B_WR( BF_IOMUXC_SW_MUX_CTL_PAD_NAND_WP_B_SION_V(DISABLED) | BF_IOMUXC_SW_MUX_CTL_PAD_NAND_WP_B_MUX_MODE_V(ALT0)); // Pad Control Register: // IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B(0x020E06C4) // HYS [16] - Hysteresis Enable Field Reset: ENABLED // DISABLED (0) - CMOS input // ENABLED (1) - Schmitt trigger input // PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU // 100K_OHM_PD (0) - 100K Ohm Pull Down // 47K_OHM_PU (1) - 47K Ohm Pull Up // 100K_OHM_PU (2) - 100K Ohm Pull Up // 22K_OHM_PU (3) - 22K Ohm Pull Up // PUE [13] - Pull / Keep Select Field Reset: PULL // KEEP (0) - Keeper Enabled // PULL (1) - Pull Enabled // PKE [12] - Pull / Keep Enable Field Reset: ENABLED // DISABLED (0) - Pull/Keeper Disabled // ENABLED (1) - Pull/Keeper Enabled // ODE [11] - Open Drain Enable Field Reset: DISABLED // Enables open drain of the pin. // DISABLED (0) - Output is CMOS. // ENABLED (1) - Output is Open Drain. // SPEED [7:6] - Speed Field Reset: 100MHZ // TBD (0) - TBD // 50MHZ (1) - Low (50 MHz) // 100MHZ (2) - Medium (100 MHz) // 200MHZ (3) - Maximum (200 MHz) // DSE [5:3] - Drive Strength Field Reset: 40_OHM // HIZ (0) - HI-Z // 240_OHM (1) - 240 Ohm // 120_OHM (2) - 120 Ohm // 80_OHM (3) - 80 Ohm // 60_OHM (4) - 60 Ohm // 48_OHM (5) - 48 Ohm // 40_OHM (6) - 40 Ohm // 34_OHM (7) - 34 Ohm // SRE [0] - Slew Rate Field Reset: SLOW // Slew rate control. // SLOW (0) - Slow Slew Rate // FAST (1) - Fast Slew Rate HW_IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B_WR( BF_IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B_HYS_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B_PUS_V(100K_OHM_PU) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B_PUE_V(PULL) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B_PKE_V(ENABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B_ODE_V(DISABLED) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B_SPEED_V(100MHZ) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B_DSE_V(40_OHM) | BF_IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B_SRE_V(SLOW)); }
29d06fa6dd69dec6c05767a648cd0fa63aa4bf16
e3acfc4f06840e23ef1185dcf367f40d3e3f59b4
/tests/regression/63-affeq/13-multiple_vars.c
d82814f6f9b85319471723a96e1b461355b494bb
[ "MIT" ]
permissive
goblint/analyzer
d62d3c610b86ed288849371b41c330c30678abc7
69ee7163eef0bfbfd6a4f3b9fda7cea5ce9ab79f
refs/heads/master
2023-08-16T21:58:53.013737
2023-08-16T08:49:18
2023-08-16T08:49:18
2,066,905
141
62
MIT
2023-09-14T18:48:34
2011-07-18T15:10:56
OCaml
UTF-8
C
false
false
264
c
13-multiple_vars.c
//SKIP //PARAM: --set ana.activated[+] affeq --enable ana.int.interval // An issue with the assignment of multiple vars made the assert evaluate to unknown int f (int j) { return j + 1; } int main() { int test = f(10); __goblint_check(test == 11); }
2613abd57ed1aab070db00781944652faf31ea07
79d343002bb63a44f8ab0dbac0c9f4ec54078c3a
/lib/libc/glibc/sysdeps/powerpc/sysdep.h
ab20890ca64f29aff679784ac7732dd2f650afb3
[ "LicenseRef-scancode-inner-net-2.0", "LGPL-2.1-or-later", "BSD-3-Clause", "HPND", "LicenseRef-scancode-pcre", "LicenseRef-scancode-other-copyleft", "ISC", "LicenseRef-scancode-other-permissive", "Spencer-94", "SunPro", "CMU-Mach", "MIT" ]
permissive
ziglang/zig
4aa75d8d3bcc9e39bf61d265fd84b7f005623fc5
f4c9e19bc3213c2bc7e03d7b06d7129882f39f6c
refs/heads/master
2023-08-31T13:16:45.980913
2023-08-31T05:50:29
2023-08-31T05:50:29
40,276,274
25,560
2,399
MIT
2023-09-14T21:09:50
2015-08-06T00:51:28
Zig
UTF-8
C
false
false
3,498
h
sysdep.h
/* Copyright (C) 1999-2021 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * Powerpc Feature masks for the Aux Vector Hardware Capabilities (AT_HWCAP). * This entry is copied to _dl_hwcap or rtld_global._dl_hwcap during startup. */ #define _SYSDEPS_SYSDEP_H 1 #include <bits/hwcap.h> #define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC) #ifdef __ASSEMBLER__ /* Symbolic names for the registers. The only portable way to write asm code is to use number but this produces really unreadable code. Therefore these symbolic names. */ /* Integer registers. */ #define r0 0 #define r1 1 #define r2 2 #define r3 3 #define r4 4 #define r5 5 #define r6 6 #define r7 7 #define r8 8 #define r9 9 #define r10 10 #define r11 11 #define r12 12 #define r13 13 #define r14 14 #define r15 15 #define r16 16 #define r17 17 #define r18 18 #define r19 19 #define r20 20 #define r21 21 #define r22 22 #define r23 23 #define r24 24 #define r25 25 #define r26 26 #define r27 27 #define r28 28 #define r29 29 #define r30 30 #define r31 31 /* Floating-point registers. */ #define fp0 0 #define fp1 1 #define fp2 2 #define fp3 3 #define fp4 4 #define fp5 5 #define fp6 6 #define fp7 7 #define fp8 8 #define fp9 9 #define fp10 10 #define fp11 11 #define fp12 12 #define fp13 13 #define fp14 14 #define fp15 15 #define fp16 16 #define fp17 17 #define fp18 18 #define fp19 19 #define fp20 20 #define fp21 21 #define fp22 22 #define fp23 23 #define fp24 24 #define fp25 25 #define fp26 26 #define fp27 27 #define fp28 28 #define fp29 29 #define fp30 30 #define fp31 31 /* Condition code registers. */ #define cr0 0 #define cr1 1 #define cr2 2 #define cr3 3 #define cr4 4 #define cr5 5 #define cr6 6 #define cr7 7 /* Vector registers. */ #define v0 0 #define v1 1 #define v2 2 #define v3 3 #define v4 4 #define v5 5 #define v6 6 #define v7 7 #define v8 8 #define v9 9 #define v10 10 #define v11 11 #define v12 12 #define v13 13 #define v14 14 #define v15 15 #define v16 16 #define v17 17 #define v18 18 #define v19 19 #define v20 20 #define v21 21 #define v22 22 #define v23 23 #define v24 24 #define v25 25 #define v26 26 #define v27 27 #define v28 28 #define v29 29 #define v30 30 #define v31 31 #define VRSAVE 256 /* The 32-bit words of a 64-bit dword are at these offsets in memory. */ #if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN # define LOWORD 0 # define HIWORD 4 #else # define LOWORD 4 # define HIWORD 0 #endif /* The high 16-bit word of a 64-bit dword is at this offset in memory. */ #if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN # define HISHORT 6 #else # define HISHORT 0 #endif /* This seems to always be the case on PPC. */ #define ALIGNARG(log2) log2 #define ASM_SIZE_DIRECTIVE(name) .size name,.-name #endif /* __ASSEMBLER__ */
609b82bf12f649986f258183f961e4c105bd4d25
ea401c3e792a50364fe11f7cea0f35f99e8f4bde
/hackathon/PengXie/NeuronStructNavigator/cmake-3.6.2/Source/cm_utf8.c
23525077596e8e9c56554f8d12d9651568c1a6fe
[ "BSD-3-Clause", "MIT" ]
permissive
Vaa3D/vaa3d_tools
edb696aa3b9b59acaf83d6d27c6ae0a14bf75fe9
e6974d5223ae70474efaa85e1253f5df1814fae8
refs/heads/master
2023-08-03T06:12:01.013752
2023-08-02T07:26:01
2023-08-02T07:26:01
50,527,925
107
86
MIT
2023-05-22T23:43:48
2016-01-27T18:19:17
C++
UTF-8
C
false
false
3,072
c
cm_utf8.c
/*============================================================================ CMake - Cross Platform Makefile Generator Copyright 2000-2009 Kitware, Inc., Insight Software Consortium Distributed under the OSI-approved BSD License (the "License"); see accompanying file Copyright.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ #include "cm_utf8.h" /* RFC 3629 07-bit: 0xxxxxxx 11-bit: 110xxxxx 10xxxxxx 16-bit: 1110xxxx 10xxxxxx 10xxxxxx 21-bit: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx Pre-RFC Compatibility 26-bit: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 31-bit: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx */ /* Number of leading ones before a zero in the byte. */ static unsigned char const cm_utf8_ones[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8 }; /* Mask away control bits from bytes with n leading ones. */ static unsigned char const cm_utf8_mask[7] = { 0xEF, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01 }; /* Minimum allowed value when first byte has n leading ones. */ static unsigned int const cm_utf8_min[7] = { 0, 0, 1u << 7, 1u << 11, 1u << 16, 1u << 21, 1u << 26 /*, 1u<<31 */ }; const char* cm_utf8_decode_character(const char* first, const char* last, unsigned int* pc) { /* Count leading ones in the first byte. */ unsigned char c = (unsigned char)*first++; unsigned char const ones = cm_utf8_ones[c]; switch (ones) { case 0: *pc = c; return first; /* One-byte character. */ case 1: case 7: case 8: return 0; /* Invalid leading byte. */ default: break; } /* Extract bits from this multi-byte character. */ { unsigned int uc = c & cm_utf8_mask[ones]; int left; for (left = ones - 1; left && first != last; --left) { c = (unsigned char)*first++; if (cm_utf8_ones[c] != 1) { return 0; } uc = (uc << 6) | (c & cm_utf8_mask[1]); } if (left > 0 || uc < cm_utf8_min[ones]) { return 0; } *pc = uc; return first; } }
d939e7e8d2807dc7edde02815505f281ba434ebd
c9bc99866cfab223c777cfb741083be3e9439d81
/product/tc0/scp_ramfw/config_psu.c
96514d095a1fd117b1012d2555710f755fda5ab1
[ "BSD-3-Clause" ]
permissive
ARM-software/SCP-firmware
4738ca86ce42d82588ddafc2226a1f353ff2c797
f6bcca436768359ffeadd84d65e8ea0c3efc7ef1
refs/heads/master
2023-09-01T16:13:36.962036
2023-08-17T13:00:20
2023-08-31T07:43:37
134,399,880
211
165
NOASSERTION
2023-09-13T14:27:10
2018-05-22T10:35:56
C
UTF-8
C
false
false
1,843
c
config_psu.c
/* * Arm SCP/MCP Software * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <tc0_mock_psu.h> #include <tc0_psu.h> #include <mod_mock_psu.h> #include <mod_psu.h> #include <fwk_element.h> #include <fwk_module.h> #include <fwk_module_idx.h> static const struct fwk_element element_table[] = { [PSU_ELEMENT_IDX_KLEIN] = { .name = "DVFS_GROUP_KLEIN", .data = &(const struct mod_psu_element_cfg){ .driver_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_MOCK_PSU, MOCK_PSU_ELEMENT_IDX_KLEIN), .driver_api_id = FWK_ID_API_INIT( FWK_MODULE_IDX_MOCK_PSU, MOD_MOCK_PSU_API_IDX_DRIVER) }, }, [PSU_ELEMENT_IDX_MATTERHORN] = { .name = "DVFS_GROUP_MATTERHORN", .data = &(const struct mod_psu_element_cfg){ .driver_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_MOCK_PSU, MOCK_PSU_ELEMENT_IDX_MATTERHORN), .driver_api_id = FWK_ID_API_INIT( FWK_MODULE_IDX_MOCK_PSU, MOD_MOCK_PSU_API_IDX_DRIVER) }, }, [PSU_ELEMENT_IDX_MATTERHORN_ELP_ARM] = { .name = "DVFS_GROUP_MATTERHORN_ELP_ARM", .data = &(const struct mod_psu_element_cfg){ .driver_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_MOCK_PSU, MOCK_PSU_ELEMENT_IDX_MATTERHORN_ELP_ARM), .driver_api_id = FWK_ID_API_INIT( FWK_MODULE_IDX_MOCK_PSU, MOD_MOCK_PSU_API_IDX_DRIVER) }, }, { 0 } }; static const struct fwk_element *psu_get_element_table(fwk_id_t module_id) { return element_table; } const struct fwk_module_config config_psu = { .elements = FWK_MODULE_DYNAMIC_ELEMENTS(psu_get_element_table), };
277f5f1f500580373d6b2c6802205409bff1d0c2
7eaf54a78c9e2117247cb2ab6d3a0c20719ba700
/SOFTWARE/A64-TERES/linux-a64/arch/parisc/include/uapi/asm/stat.h
d76fbda5d62c0437f5fb52c389e144597f054b12
[ "Linux-syscall-note", "GPL-2.0-only", "GPL-1.0-or-later", "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
OLIMEX/DIY-LAPTOP
ae82f4ee79c641d9aee444db9a75f3f6709afa92
a3fafd1309135650bab27f5eafc0c32bc3ca74ee
refs/heads/rel3
2023-08-04T01:54:19.483792
2023-04-03T07:18:12
2023-04-03T07:18:12
80,094,055
507
92
Apache-2.0
2023-04-03T07:05:59
2017-01-26T07:25:50
C
UTF-8
C
false
false
2,607
h
stat.h
#ifndef _PARISC_STAT_H #define _PARISC_STAT_H #include <linux/types.h> struct stat { unsigned int st_dev; /* dev_t is 32 bits on parisc */ ino_t st_ino; /* 32 bits */ mode_t st_mode; /* 16 bits */ unsigned short st_nlink; /* 16 bits */ unsigned short st_reserved1; /* old st_uid */ unsigned short st_reserved2; /* old st_gid */ unsigned int st_rdev; off_t st_size; time_t st_atime; unsigned int st_atime_nsec; time_t st_mtime; unsigned int st_mtime_nsec; time_t st_ctime; unsigned int st_ctime_nsec; int st_blksize; int st_blocks; unsigned int __unused1; /* ACL stuff */ unsigned int __unused2; /* network */ ino_t __unused3; /* network */ unsigned int __unused4; /* cnodes */ unsigned short __unused5; /* netsite */ short st_fstype; unsigned int st_realdev; unsigned short st_basemode; unsigned short st_spareshort; uid_t st_uid; gid_t st_gid; unsigned int st_spare4[3]; }; #define STAT_HAVE_NSEC typedef __kernel_off64_t off64_t; struct hpux_stat64 { unsigned int st_dev; /* dev_t is 32 bits on parisc */ ino_t st_ino; /* 32 bits */ mode_t st_mode; /* 16 bits */ unsigned short st_nlink; /* 16 bits */ unsigned short st_reserved1; /* old st_uid */ unsigned short st_reserved2; /* old st_gid */ unsigned int st_rdev; off64_t st_size; time_t st_atime; unsigned int st_spare1; time_t st_mtime; unsigned int st_spare2; time_t st_ctime; unsigned int st_spare3; int st_blksize; __u64 st_blocks; unsigned int __unused1; /* ACL stuff */ unsigned int __unused2; /* network */ ino_t __unused3; /* network */ unsigned int __unused4; /* cnodes */ unsigned short __unused5; /* netsite */ short st_fstype; unsigned int st_realdev; unsigned short st_basemode; unsigned short st_spareshort; uid_t st_uid; gid_t st_gid; unsigned int st_spare4[3]; }; /* This is the struct that 32-bit userspace applications are expecting. * How 64-bit apps are going to be compiled, I have no idea. But at least * this way, we don't have a wrapper in the kernel. */ struct stat64 { unsigned long long st_dev; unsigned int __pad1; unsigned int __st_ino; /* Not actually filled in */ unsigned int st_mode; unsigned int st_nlink; unsigned int st_uid; unsigned int st_gid; unsigned long long st_rdev; unsigned int __pad2; signed long long st_size; signed int st_blksize; signed long long st_blocks; signed int st_atime; unsigned int st_atime_nsec; signed int st_mtime; unsigned int st_mtime_nsec; signed int st_ctime; unsigned int st_ctime_nsec; unsigned long long st_ino; }; #endif
9f85af427da20b8db14e8e71f8afa16534405cf2
8a51a96f61699f0318315ccc89cef39f6866f2b5
/src/bin/psql/psqlscanslash.h
7724242f371d7c58c54140c8c924fee4076b93ea
[ "PostgreSQL" ]
permissive
postgres/postgres
979febf2b41c00090d1256228f768f33e7ef3b6f
b5934bfd6071fed3a38cea0cfaa93afda63d9c0c
refs/heads/master
2023-08-31T00:10:01.373472
2023-08-30T23:07:48
2023-08-30T23:07:48
927,442
13,691
4,807
NOASSERTION
2023-09-09T13:59:15
2010-09-21T11:35:45
C
UTF-8
C
false
false
1,086
h
psqlscanslash.h
/* * psql - the PostgreSQL interactive terminal * * Copyright (c) 2000-2023, PostgreSQL Global Development Group * * src/bin/psql/psqlscanslash.h */ #ifndef PSQLSCANSLASH_H #define PSQLSCANSLASH_H #include "fe_utils/psqlscan.h" /* Different ways for scan_slash_option to handle parameter words */ enum slash_option_type { OT_NORMAL, /* normal case */ OT_SQLID, /* treat as SQL identifier */ OT_SQLIDHACK, /* SQL identifier, but don't downcase */ OT_FILEPIPE, /* it's a filename or pipe */ OT_WHOLE_LINE /* just snarf the rest of the line */ }; extern char *psql_scan_slash_command(PsqlScanState state); extern char *psql_scan_slash_option(PsqlScanState state, enum slash_option_type type, char *quote, bool semicolon); extern void psql_scan_slash_command_end(PsqlScanState state); extern int psql_scan_get_paren_depth(PsqlScanState state); extern void psql_scan_set_paren_depth(PsqlScanState state, int depth); extern void dequote_downcase_identifier(char *str, bool downcase, int encoding); #endif /* PSQLSCANSLASH_H */
f1f84aef1b04644629d1169d6c6edc4e7094bb1c
37474fe5a1caaf836c550996a13a4867a54537d8
/osu.Framework/Resources/Shaders/Internal/sh_Vertex_Output.h
3f4b9aa18cbe53faf1ff0b67b44eb8e9021f9275
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
ppy/osu-framework
a09c244ef7aa4e6a783a25fb48f2f4f6182d8c89
e35b025895d30fad0fa65bc42fed799deedaffce
refs/heads/master
2023-08-31T14:48:10.111701
2023-08-24T14:03:38
2023-08-24T14:03:38
66,614,524
1,587
706
MIT
2023-09-14T10:43:56
2016-08-26T03:45:35
C#
UTF-8
C
false
false
702
h
sh_Vertex_Output.h
// Automatically included for every vertex shader. #ifndef INTERNAL_VERTEX_OUTPUT_H #define INTERNAL_VERTEX_OUTPUT_H void main() { {{ real_main }}(); // Invoke real main func if (g_IsDepthRangeZeroToOne) gl_Position.z = gl_Position.z / 2.0 + 0.5; // When the device's texture coordinates are inverted, and when we are outputting to a framebuffer, // we should ensure that the framebuffer output is also inverted so that it's treated as a normal texture // later on in the frame. bool requiresFramebufferInvert = !g_BackbufferDraw && !g_IsUvOriginTopLeft; if (g_IsClipSpaceYInverted || requiresFramebufferInvert) gl_Position.y = -gl_Position.y; } #endif
fc6537f74ca3871dfa491a6192030fcb2199d79b
2ef0e696b0b8d1b762a3df21a258406f1e0c73e2
/include/EASTL/internal/atomic/atomic_macros/atomic_macros_load.h
76580593ddf4af3493be783f5646286793c55568
[ "BSD-3-Clause" ]
permissive
electronicarts/EASTL
3fdf65152aaadae7c86e94aa482b950494f31c2f
05f4b4aef33f2f3ded08f19fa97f5a27ff35ff9f
refs/heads/master
2023-08-30T16:35:49.267717
2023-08-16T17:55:47
2023-08-16T17:55:47
48,068,902
7,952
1,216
BSD-3-Clause
2023-08-16T17:55:48
2015-12-15T21:04:13
C++
UTF-8
C
false
false
2,790
h
atomic_macros_load.h
///////////////////////////////////////////////////////////////////////////////// // Copyright (c) Electronic Arts Inc. All rights reserved. ///////////////////////////////////////////////////////////////////////////////// #ifndef EASTL_ATOMIC_INTERNAL_MACROS_LOAD_H #define EASTL_ATOMIC_INTERNAL_MACROS_LOAD_H #if defined(EA_PRAGMA_ONCE_SUPPORTED) #pragma once #endif ///////////////////////////////////////////////////////////////////////////////// // // void EASTL_ATOMIC_LOAD_*_N(type, type ret, type * ptr) // #define EASTL_ATOMIC_LOAD_RELAXED_8(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_RELAXED_8)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_ACQUIRE_8(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_ACQUIRE_8)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_SEQ_CST_8(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_SEQ_CST_8)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_RELAXED_16(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_RELAXED_16)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_ACQUIRE_16(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_ACQUIRE_16)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_SEQ_CST_16(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_SEQ_CST_16)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_RELAXED_32(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_RELAXED_32)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_ACQUIRE_32(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_ACQUIRE_32)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_SEQ_CST_32(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_SEQ_CST_32)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_RELAXED_64(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_RELAXED_64)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_ACQUIRE_64(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_ACQUIRE_64)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_SEQ_CST_64(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_SEQ_CST_64)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_RELAXED_128(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_RELAXED_128)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_ACQUIRE_128(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_ACQUIRE_128)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_SEQ_CST_128(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_SEQ_CST_128)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_READ_DEPENDS_32(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_READ_DEPENDS_32)(type, ret, ptr) #define EASTL_ATOMIC_LOAD_READ_DEPENDS_64(type, ret, ptr) \ EASTL_ATOMIC_CHOOSE_OP_IMPL(ATOMIC_LOAD_READ_DEPENDS_64)(type, ret, ptr) #endif /* EASTL_ATOMIC_INTERNAL_MACROS_LOAD_H */
4572fbcf4b00fcefad4c5ab83df2b9f9423551fe
99bdb3251fecee538e0630f15f6574054dfc1468
/libcpu/avr32/uc3/serial.c
aa63ae846fbbfde6e20994076c205c2a7ff1fdfb
[ "Apache-2.0" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
7,144
c
serial.c
/* * Copyright (c) 2006-2022, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2009-02-05 Bernard first version * 2009-10-25 Bernard fix rt_serial_read bug when there is no data * in the buffer. * 2010-03-29 Bernard cleanup code. * 2010-03-30 Kyle Ported from STM32 to AVR32. */ #include "serial.h" #include "compiler.h" #include "usart.h" struct rt_device _rt_usart_device; struct avr32_serial_int_rx _rt_usart_rx; struct avr32_serial_device uart = { .uart_device = (avr32_usart_t *) &AVR32_USART1, .int_rx = &_rt_usart_rx }; /** * @addtogroup AVR32UC3 */ /*@{*/ /* RT-Thread Device Interface */ static rt_err_t rt_serial_init (rt_device_t dev) { struct avr32_serial_device* uart = (struct avr32_serial_device*) dev->user_data; if (!(dev->flag & RT_DEVICE_FLAG_ACTIVATED)) { if (dev->flag & RT_DEVICE_FLAG_INT_RX) { rt_memset(uart->int_rx->rx_buffer, 0, sizeof(uart->int_rx->rx_buffer)); uart->int_rx->read_index = 0; uart->int_rx->save_index = 0; } dev->flag |= RT_DEVICE_FLAG_ACTIVATED; } return RT_EOK; } static rt_err_t rt_serial_open(rt_device_t dev, rt_uint16_t oflag) { return RT_EOK; } static rt_err_t rt_serial_close(rt_device_t dev) { return RT_EOK; } static rt_ssize_t rt_serial_read (rt_device_t dev, rt_off_t pos, void* buffer, rt_size_t size) { rt_uint8_t* ptr; rt_err_t err_code; struct avr32_serial_device* uart; ptr = buffer; err_code = RT_EOK; uart = (struct avr32_serial_device*)dev->user_data; if (dev->flag & RT_DEVICE_FLAG_INT_RX) { /* interrupt mode Rx */ while (size) { rt_base_t level; /* disable interrupt */ level = rt_hw_interrupt_disable(); if (uart->int_rx->read_index != uart->int_rx->save_index) { /* read a character */ *ptr++ = uart->int_rx->rx_buffer[uart->int_rx->read_index]; size--; /* move to next position */ uart->int_rx->read_index ++; if (uart->int_rx->read_index >= UART_RX_BUFFER_SIZE) uart->int_rx->read_index = 0; } else { /* set error code */ err_code = -RT_EEMPTY; /* enable interrupt */ rt_hw_interrupt_enable(level); break; } /* enable interrupt */ rt_hw_interrupt_enable(level); } } else { /* polling mode */ while ((rt_uint32_t)ptr - (rt_uint32_t)buffer < size) { while (usart_test_hit(uart->uart_device)) { *ptr = uart->uart_device->rhr & 0xff; ptr ++; } } } /* set error code */ rt_set_errno(err_code); return (rt_uint32_t)ptr - (rt_uint32_t)buffer; } static rt_ssize_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buffer, rt_size_t size) { rt_uint8_t* ptr; rt_err_t err_code; struct avr32_serial_device* uart; err_code = RT_EOK; ptr = (rt_uint8_t*)buffer; uart = (struct avr32_serial_device*)dev->user_data; if (dev->flag & RT_DEVICE_FLAG_INT_TX) { /* interrupt mode Tx, does not support */ RT_ASSERT(0); } else { /* polling mode */ if (dev->flag & RT_DEVICE_FLAG_STREAM) { /* stream mode */ while (size) { usart_putchar(uart->uart_device, (int) *ptr); ++ptr; --size; } } else { /* write data directly */ while (size) { usart_bw_write_char(uart->uart_device, (int) *ptr); ++ptr; --size; } } } /* set error code */ rt_set_errno(err_code); return (rt_uint32_t)ptr - (rt_uint32_t)buffer; } static rt_err_t rt_serial_control (rt_device_t dev, int cmd, void *args) { struct avr32_serial_device* uart; RT_ASSERT(dev != RT_NULL); uart = (struct avr32_serial_device*)dev->user_data; switch (cmd) { case RT_DEVICE_CTRL_SUSPEND: /* suspend device */ dev->flag |= RT_DEVICE_FLAG_SUSPENDED; break; case RT_DEVICE_CTRL_RESUME: /* resume device */ dev->flag &= ~RT_DEVICE_FLAG_SUSPENDED; break; } return RT_EOK; } /* * serial register for STM32 * support STM32F103VB and STM32F103ZE */ rt_err_t rt_hw_serial_register(rt_device_t device, const char* name, rt_uint32_t flag, struct avr32_serial_device *serial) { RT_ASSERT(device != RT_NULL); if ((flag & RT_DEVICE_FLAG_DMA_RX) || (flag & RT_DEVICE_FLAG_INT_TX)) { RT_ASSERT(0); } device->type = RT_Device_Class_Char; device->rx_indicate = RT_NULL; device->tx_complete = RT_NULL; device->init = rt_serial_init; device->open = rt_serial_open; device->close = rt_serial_close; device->read = rt_serial_read; device->write = rt_serial_write; device->control = rt_serial_control; device->user_data = serial; /* register a character device */ return rt_device_register(device, name, RT_DEVICE_FLAG_RDWR | flag); } /* ISR for serial interrupt */ void rt_hw_serial_isr(void) { struct avr32_serial_device* uart = (struct avr32_serial_device*) _rt_usart_device.user_data; rt_base_t level; if (usart_test_hit(uart->uart_device)) { /* interrupt mode receive */ RT_ASSERT(device->flag & RT_DEVICE_FLAG_INT_RX); /* disable interrupt */ level = rt_hw_interrupt_disable(); /* save character */ uart->int_rx->rx_buffer[uart->int_rx->save_index] = uart->uart_device->rhr & 0xff; uart->int_rx->save_index ++; if (uart->int_rx->save_index >= UART_RX_BUFFER_SIZE) uart->int_rx->save_index = 0; /* if the next position is read index, discard this 'read char' */ if (uart->int_rx->save_index == uart->int_rx->read_index) { uart->int_rx->read_index ++; if (uart->int_rx->read_index >= UART_RX_BUFFER_SIZE) uart->int_rx->read_index = 0; } /* enable interrupt */ rt_hw_interrupt_enable(level); /* invoke callback */ if (_rt_usart_device.rx_indicate != RT_NULL) { rt_size_t rx_length; /* get rx length */ rx_length = uart->int_rx->read_index > uart->int_rx->save_index ? UART_RX_BUFFER_SIZE - uart->int_rx->read_index + uart->int_rx->save_index : uart->int_rx->save_index - uart->int_rx->read_index; _rt_usart_device.rx_indicate(&_rt_usart_device, rx_length); } } else { usart_reset_status(uart->uart_device); } } /*@}*/
def8abff7352aac5ea976905ad40192a15f2de16
c85df9a1ad627707fc603f40f7df056af16900c9
/source/usbloader/alternatedol.h
5195f3d1013e92c729c0e7ac4761ef892feea36c
[]
no_license
wiidev/usbloadergx
28b582c2c8231ca7f313a321a134d6784358a770
e25c4e96430524c080767679b0c4a0d7595412a8
refs/heads/enhanced
2023-08-11T18:47:12.728031
2023-01-07T23:30:02
2023-01-07T23:30:02
204,522,898
313
124
null
2023-07-21T17:06:18
2019-08-26T17:05:59
C
UTF-8
C
false
false
332
h
alternatedol.h
#ifndef _ALTERNATEDOL_H_ #define _ALTERNATEDOL_H_ #ifdef __cplusplus extern "C" { #endif /* not the full path is needed here, the path where the dol is */ bool Load_Dol(void **buffer, int* dollen, const char * filepath); u32 load_dol_image(void *dolstart); u32 Load_Dol_from_disc(u32 offset); #ifdef __cplusplus } #endif #endif
e6a0f4d2084d57ff596b730abebe18ecc1847806
e8b04bef9aa1ac8e2c109dd315f133c8f4d28ae6
/tests/api/controllers/robot_multiple_step_supervisor/robot_multiple_step_supervisor.c
56d790c550439475d898578c7762a6f12e166171
[ "Apache-2.0" ]
permissive
cyberbotics/webots
f075dacf4067e8dcebbfd89e8690df8525f6d745
8aba6eaae76989facf3442305c8089d3cc366bcf
refs/heads/master
2023-08-31T09:41:13.205940
2023-08-18T10:48:30
2023-08-18T10:48:30
156,228,018
2,495
1,525
Apache-2.0
2023-08-28T16:30:33
2018-11-05T14:09:10
C++
UTF-8
C
false
false
715
c
robot_multiple_step_supervisor.c
#include <webots/robot.h> #include <webots/supervisor.h> int main(int argc, char **argv) { wb_robot_init(); int time_step = wb_robot_get_basic_time_step(); wb_robot_step(3 * time_step); // update world WbNodeRef robot = wb_supervisor_node_get_from_def("ROBOT"); WbFieldRef rotationField = wb_supervisor_node_get_field(robot, "rotation"); WbFieldRef translationField = wb_supervisor_node_get_field(robot, "translation"); double newRotation[4] = {0.0, 1.0, 0.0, 1.5708}; double newTranslation[3] = {-0.05, 0.0295, 0.1}; wb_supervisor_field_set_sf_rotation(rotationField, newRotation); wb_supervisor_field_set_sf_vec3f(translationField, newTranslation); wb_robot_cleanup(); return 0; }
7ebbfee0d3dcc0062525b14f33f781d0dd9e01b4
50dd46b8ece33f3cdd174284b15d1d51f89669d4
/third_party/cpython_zipfile/turbozipfile.c
d7223abbc39d1be8d85e86ba3a9b1d953688e773
[ "GPL-1.0-or-later", "LicenseRef-scancode-python-cwi", "BSD-3-Clause", "0BSD", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-other-copyleft", "Python-2.0", "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
google/google-ctf
f99da1ee07729bbccb869fff1cbaed6a80e43bcc
df02323eaf945d15e124801c74abaadca2749dc7
refs/heads/master
2023-08-31T14:30:27.548081
2023-08-29T13:04:20
2023-08-29T13:04:20
131,317,137
4,136
607
Apache-2.0
2023-08-30T22:17:02
2018-04-27T15:56:03
Go
UTF-8
C
false
false
1,651,009
c
turbozipfile.c
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Author: Ian Eldred Pudney #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif #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_23" #define CYTHON_HEX_VERSION 0x001D17F0 #define CYTHON_FUTURE_DIVISION 1 #include <stddef.h> #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<class T> 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 <stdint.h> #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 CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #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" #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #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) #endif #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_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; } 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 #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) #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #endif #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 #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #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 PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #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) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(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 <math.h> #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_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) 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__turbozipfile #define __PYX_HAVE_API__turbozipfile #ifdef _OPENMP #include <omp.h> #endif #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 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_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 <cstdlib> #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 #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 #define likely(x) (x) #define unlikely(x) (x) #endif 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; static const char *__pyx_f[] = { "turbozipfile.py", }; struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter; struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member; struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr; struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry; struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs; struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr; struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; struct __pyx_defaults { PyObject *__pyx_arg_compression; }; struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter { PyObject_HEAD PyObject *__pyx_v_crc32; PyObject *__pyx_v_crctable; PyObject *__pyx_v_key0; PyObject *__pyx_v_key1; PyObject *__pyx_v_key2; PyObject *__pyx_v_update_keys; }; struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member { PyObject_HEAD PyObject *__pyx_v_arcname; PyObject *__pyx_v_invalid_path_parts; }; struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr { PyObject_HEAD struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *__pyx_outer_scope; PyObject *__pyx_v_x; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry { PyObject_HEAD PyObject *__pyx_v_path; PyObject *__pyx_v_tail; }; struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs { PyObject_HEAD PyObject *__pyx_v_parents; }; struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr { PyObject_HEAD struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *__pyx_outer_scope; PyObject *__pyx_v_p; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; #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) #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 static PyObject *__Pyx_GetBuiltinName(PyObject *name); 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); static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #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);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #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_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 #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); #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 #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, Py_ssize_t 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 #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 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); 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)); } #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); __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif #if PY_MAJOR_VERSION < 3 #define __Pyx_PyString_Join __Pyx_PyBytes_Join #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) #else #define __Pyx_PyString_Join PyUnicode_Join #define __Pyx_PyBaseString_Join PyUnicode_Join #endif #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION < 3 #define __Pyx_PyBytes_Join _PyString_Join #else #define __Pyx_PyBytes_Join _PyBytes_Join #endif #else static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); #endif #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif #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 #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 #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 #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 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { PyObject *res; PyTypeObject *tp = Py_TYPE(obj); #if PY_MAJOR_VERSION < 3 if (unlikely(PyInstance_Check(obj))) return __Pyx_PyObject_GetAttrStr(obj, attr_name); #endif res = _PyType_Lookup(tp, attr_name); if (likely(res)) { descrgetfunc f = Py_TYPE(res)->tp_descr_get; if (!f) { Py_INCREF(res); } else { res = f(res, obj, (PyObject *)tp); } } else { PyErr_SetObject(PyExc_AttributeError, attr_name); } return res; } #else #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) #endif #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 #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 static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); #include <string.h> static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif #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); #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 #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char); #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_RshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_RshiftObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceRshift(op1, op2) : PyNumber_Rshift(op1, op2)) #endif #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2)) #endif #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 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); #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_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_OrObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_OrObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceOr(op1, op2) : PyNumber_Or(op1, op2)) #endif #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_XorObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_XorObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceXor(op1, op2) : PyNumber_Xor(op1, op2)) #endif static CYTHON_INLINE int __Pyx_PyByteArray_Append(PyObject* bytearray, int value); static CYTHON_INLINE int __Pyx_PyByteArray_AppendObject(PyObject* bytearray, PyObject* value); static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #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; size_t defaults_size; 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)) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, 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); static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_AddCObj(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif #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 #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 static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_TrueDivideObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2)) #endif #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); __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value); typedef struct { PyObject *type; PyObject **method_name; PyCFunction func; PyObject *method; int flag; } __Pyx_CachedCFunction; static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); #else #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) #endif static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); #else #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) #endif #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 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) #else #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) #endif static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj); #include "descrobject.h" static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method); #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 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); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *); #if CYTHON_USE_EXC_INFO_STACK #define __Pyx_ExcInfoStruct _PyErr_StackItem #else typedef struct { PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; } __Pyx_ExcInfoStruct; #endif typedef struct { PyObject_HEAD __pyx_coroutine_body_t body; PyObject *closure; __Pyx_ExcInfoStruct gi_exc_state; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; PyObject *gi_name; PyObject *gi_qualname; PyObject *gi_modulename; PyObject *gi_code; int resume_label; char is_running; } __pyx_CoroutineObject; static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); static int __Pyx_Coroutine_clear(PyObject *self); static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Coroutine_Close(PyObject *self); static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); #if CYTHON_USE_EXC_INFO_STACK #define __Pyx_Coroutine_SwapException(self) #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) #else #define __Pyx_Coroutine_SwapException(self) {\ __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ } #define __Pyx_Coroutine_ResetAndClearException(self) {\ __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ } #endif #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) #endif static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); static int __Pyx_patch_abc(void); #define __Pyx_Generator_USED static PyTypeObject *__pyx_GeneratorType = 0; #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name) static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(void); static int __Pyx_check_binary_version(void); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); static PyTypeObject *__pyx_ptype_12turbozipfile___pyx_scope_struct___ZipDecrypter = 0; static PyTypeObject *__pyx_ptype_12turbozipfile___pyx_scope_struct_1__extract_member = 0; static PyTypeObject *__pyx_ptype_12turbozipfile___pyx_scope_struct_2_genexpr = 0; static PyTypeObject *__pyx_ptype_12turbozipfile___pyx_scope_struct_3__ancestry = 0; static PyTypeObject *__pyx_ptype_12turbozipfile___pyx_scope_struct_4__implied_dirs = 0; static PyTypeObject *__pyx_ptype_12turbozipfile___pyx_scope_struct_5_genexpr = 0; #define __Pyx_MODULE_NAME "turbozipfile" extern int __pyx_module_is_main_turbozipfile; int __pyx_module_is_main_turbozipfile = 0; static PyObject *__pyx_builtin_ImportError; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_property; static PyObject *__pyx_builtin_staticmethod; static PyObject *__pyx_builtin_OSError; static PyObject *__pyx_builtin_open; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_map; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_EOFError; static PyObject *__pyx_builtin_super; static PyObject *__pyx_builtin_print; static PyObject *__pyx_builtin_UnicodeDecodeError; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_vars; static PyObject *__pyx_builtin_filter; static const char __pyx_k_[] = ""; static const char __pyx_k_H[] = "<H"; static const char __pyx_k_Q[] = "<Q"; static const char __pyx_k_a[] = "a"; static const char __pyx_k_b[] = "b"; static const char __pyx_k_c[] = "c"; static const char __pyx_k_d[] = "d"; static const char __pyx_k_e[] = "-e"; static const char __pyx_k_f[] = "f"; static const char __pyx_k_h[] = "h"; static const char __pyx_k_i[] = "i"; static const char __pyx_k_j[] = "j"; static const char __pyx_k_k[] = "k"; static const char __pyx_k_l[] = "-l"; static const char __pyx_k_n[] = "n"; static const char __pyx_k_p[] = "p"; static const char __pyx_k_r[] = "r"; static const char __pyx_k_t[] = "-t"; static const char __pyx_k_w[] = "w"; static const char __pyx_k_x[] = "x"; static const char __pyx_k_12[] = "12"; static const char __pyx_k_19[] = "19"; static const char __pyx_k_46[] = "<46"; static const char __pyx_k_HH[] = "<HH"; static const char __pyx_k_PK[] = "PK\005\006"; static const char __pyx_k__6[] = "\000\000"; static const char __pyx_k__8[] = "/"; static const char __pyx_k_at[] = "at"; static const char __pyx_k_ch[] = "ch"; static const char __pyx_k_fp[] = "fp"; static const char __pyx_k_hi[] = "hi"; static const char __pyx_k_id[] = "id"; static const char __pyx_k_io[] = "io"; static const char __pyx_k_ln[] = "ln"; static const char __pyx_k_lo[] = "lo"; static const char __pyx_k_os[] = "os"; static const char __pyx_k_rb[] = "rb"; static const char __pyx_k_sz[] = "sz"; static const char __pyx_k_tp[] = "tp"; static const char __pyx_k_wb[] = "wb"; static const char __pyx_k_xb[] = "xb"; static const char __pyx_k_zf[] = "zf"; static const char __pyx_k_04x[] = "04x"; static const char __pyx_k_12d[] = "12d"; static const char __pyx_k_BBH[] = "<BBH"; static const char __pyx_k_CRC[] = "CRC"; static const char __pyx_k__10[] = "<"; static const char __pyx_k__11[] = ">"; static const char __pyx_k__13[] = ")"; static const char __pyx_k__28[] = " ("; static const char __pyx_k__29[] = "."; static const char __pyx_k__30[] = "\n"; static const char __pyx_k__39[] = " "; static const char __pyx_k_add[] = "add"; static const char __pyx_k_all[] = "__all__"; static const char __pyx_k_buf[] = "buf"; static const char __pyx_k_bz2[] = "bz2"; static const char __pyx_k_cls[] = "cls"; static const char __pyx_k_crc[] = "crc"; static const char __pyx_k_del[] = "__del__"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_end[] = "end"; static const char __pyx_k_eof[] = "eof"; static const char __pyx_k_get[] = "get"; static const char __pyx_k_map[] = "map"; static const char __pyx_k_new[] = "__new__"; static const char __pyx_k_pop[] = "pop"; static const char __pyx_k_pos[] = "pos"; static const char __pyx_k_pwd[] = "pwd"; static const char __pyx_k_r_b[] = "r+b"; static const char __pyx_k_res[] = "res"; static const char __pyx_k_sep[] = "sep"; static const char __pyx_k_sig[] = "sig"; static const char __pyx_k_src[] = "src"; static const char __pyx_k_str[] = "__str__"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_t_2[] = "t"; static const char __pyx_k_w_b[] = "w+b"; static const char __pyx_k_x_b[] = "x+b"; static const char __pyx_k_xid[] = "xid"; static const char __pyx_k_PK_2[] = "PK\001\002"; static const char __pyx_k_PK_3[] = "PK\003\004"; static const char __pyx_k_PK_4[] = "PK\006\007"; static const char __pyx_k_PK_5[] = "PK\006\006"; static const char __pyx_k_Path[] = "Path"; static const char __pyx_k_Size[] = "Size"; static const char __pyx_k_args[] = "args"; static const char __pyx_k_comp[] = "_comp"; static const char __pyx_k_data[] = "data"; static const char __pyx_k_date[] = "date"; static const char __pyx_k_exit[] = "__exit__"; static const char __pyx_k_file[] = "file"; static const char __pyx_k_find[] = "find"; static const char __pyx_k_fpin[] = "fpin"; static const char __pyx_k_help[] = "help"; static const char __pyx_k_info[] = "info"; static const char __pyx_k_init[] = "_init"; static const char __pyx_k_join[] = "join"; static const char __pyx_k_key0[] = "key0"; static const char __pyx_k_key1[] = "key1"; static const char __pyx_k_key2[] = "key2"; static const char __pyx_k_left[] = "_left"; static const char __pyx_k_line[] = "line"; static const char __pyx_k_list[] = "--list"; static const char __pyx_k_lock[] = "lock"; static const char __pyx_k_lz77[] = "lz77"; static const char __pyx_k_lzma[] = "lzma"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_make[] = "make"; static const char __pyx_k_mode[] = "mode"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_next[] = "_next"; static const char __pyx_k_open[] = "open"; static const char __pyx_k_pack[] = "pack"; static const char __pyx_k_path[] = "path"; static const char __pyx_k_peek[] = "peek"; static const char __pyx_k_ppmd[] = "ppmd"; static const char __pyx_k_read[] = "read"; static const char __pyx_k_repr[] = "__repr__"; static const char __pyx_k_root[] = "root"; static const char __pyx_k_seek[] = "seek"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_send[] = "send"; static const char __pyx_k_size[] = " (size="; static const char __pyx_k_stat[] = "stat"; static const char __pyx_k_strm[] = "strm"; static const char __pyx_k_subs[] = "subs"; static const char __pyx_k_tail[] = "tail"; static const char __pyx_k_tell[] = "tell"; static const char __pyx_k_test[] = "--test"; static const char __pyx_k_time[] = "time"; static const char __pyx_k_type[] = "type"; static const char __pyx_k_vars[] = "vars"; static const char __pyx_k_warn[] = "warn"; static const char __pyx_k_xids[] = "xids"; static const char __pyx_k_xlen[] = "xlen"; static const char __pyx_k_zlib[] = "zlib"; static const char __pyx_k_4sLQL[] = "<4sLQL"; static const char __pyx_k_MAX_N[] = "MAX_N"; static const char __pyx_k_RLock[] = "RLock"; static const char __pyx_k_bzip2[] = "bzip2"; static const char __pyx_k_chain[] = "chain"; static const char __pyx_k_chunk[] = "chunk"; static const char __pyx_k_class[] = "__class__"; static const char __pyx_k_close[] = "close"; static const char __pyx_k_crc32[] = "crc32"; static const char __pyx_k_debug[] = "debug"; static const char __pyx_k_descr[] = "descr"; static const char __pyx_k_disks[] = "disks"; static const char __pyx_k_enter[] = "__enter__"; static const char __pyx_k_eof_2[] = "_eof"; static const char __pyx_k_error[] = "error"; static const char __pyx_k_extra[] = "extra"; static const char __pyx_k_field[] = "field"; static const char __pyx_k_flags[] = "flags"; static const char __pyx_k_flush[] = "flush"; static const char __pyx_k_fname[] = "fname"; static const char __pyx_k_group[] = "group"; static const char __pyx_k_isdir[] = "isdir"; static const char __pyx_k_limit[] = "limit"; static const char __pyx_k_mkdir[] = "mkdir"; static const char __pyx_k_names[] = "names"; static const char __pyx_k_nargs[] = "nargs"; static const char __pyx_k_pos_2[] = "_pos"; static const char __pyx_k_print[] = "print"; static const char __pyx_k_props[] = "props"; static const char __pyx_k_psize[] = "psize"; static const char __pyx_k_pwd_2[] = "_pwd"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_read1[] = "_read1"; static const char __pyx_k_read2[] = "_read2"; static const char __pyx_k_rfind[] = "rfind"; static const char __pyx_k_slots[] = "__slots__"; static const char __pyx_k_split[] = "split"; static const char __pyx_k_start[] = "start"; static const char __pyx_k_store[] = "store"; static const char __pyx_k_super[] = "super"; static const char __pyx_k_terse[] = "terse"; static const char __pyx_k_throw[] = "throw"; static const char __pyx_k_total[] = "total"; static const char __pyx_k_utf_8[] = "utf-8"; static const char __pyx_k_value[] = "value"; static const char __pyx_k_win32[] = "win32"; static const char __pyx_k_write[] = "write"; static const char __pyx_k_zinfo[] = "zinfo"; static const char __pyx_k_CD_CRC[] = "_CD_CRC"; static const char __pyx_k_FH_CRC[] = "_FH_CRC"; static const char __pyx_k_Struct[] = "Struct"; static const char __pyx_k_altsep[] = "altsep"; static const char __pyx_k_append[] = "append"; static const char __pyx_k_buffer[] = "buffer"; static const char __pyx_k_closed[] = "closed"; static const char __pyx_k_concat[] = "concat"; static const char __pyx_k_curdir[] = "curdir"; static const char __pyx_k_decode[] = "decode"; static const char __pyx_k_decomp[] = "_decomp"; static const char __pyx_k_dedupe[] = "_dedupe"; static const char __pyx_k_differ[] = " differ."; static const char __pyx_k_diskno[] = "diskno"; static const char __pyx_k_endrec[] = "endrec"; static const char __pyx_k_exists[] = "exists"; static const char __pyx_k_file_2[] = "_file"; static const char __pyx_k_file_r[] = " file=%r"; static const char __pyx_k_filter[] = "filter"; static const char __pyx_k_format[] = "format"; static const char __pyx_k_fspath[] = "fspath"; static const char __pyx_k_getcwd[] = "getcwd"; static const char __pyx_k_header[] = "header"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_init_2[] = "__init__"; static const char __pyx_k_is_dir[] = "is_dir"; static const char __pyx_k_islice[] = "islice"; static const char __pyx_k_kwargs[] = "kwargs"; static const char __pyx_k_list_2[] = "list"; static const char __pyx_k_lock_2[] = "_lock"; static const char __pyx_k_main_2[] = "main"; static const char __pyx_k_member[] = "member"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_name_2[] = "name"; static const char __pyx_k_name_r[] = " name=%r"; static const char __pyx_k_next_2[] = "next"; static const char __pyx_k_object[] = "object"; static const char __pyx_k_offset[] = "offset"; static const char __pyx_k_pardir[] = "pardir"; static const char __pyx_k_parent[] = "parent"; static const char __pyx_k_parser[] = "parser"; static const char __pyx_k_reduce[] = "reduce"; static const char __pyx_k_reloff[] = "reloff"; static const char __pyx_k_result[] = "result"; static const char __pyx_k_rstrip[] = "rstrip"; static const char __pyx_k_setter[] = "setter"; static const char __pyx_k_shrink[] = "shrink"; static const char __pyx_k_shutil[] = "shutil"; static const char __pyx_k_source[] = "source"; static const char __pyx_k_stream[] = "stream"; static const char __pyx_k_struct[] = "struct"; static const char __pyx_k_target[] = "target"; static const char __pyx_k_test_2[] = "test"; static const char __pyx_k_test_3[] = "__test__"; static const char __pyx_k_unpack[] = "unpack"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_volume[] = "volume"; static const char __pyx_k_whence[] = "whence"; static const char __pyx_k_4s4H2LH[] = "<4s4H2LH"; static const char __pyx_k_BytesIO[] = "BytesIO"; static const char __pyx_k_CD_DATE[] = "_CD_DATE"; static const char __pyx_k_CD_TIME[] = "_CD_TIME"; static const char __pyx_k_OSError[] = "OSError"; static const char __pyx_k_ZipFile[] = "ZipFile"; static const char __pyx_k_ZipInfo[] = "ZipInfo"; static const char __pyx_k_arcname[] = "arcname"; static const char __pyx_k_as_dirs[] = "as_dirs"; static const char __pyx_k_badfile[] = "badfile"; static const char __pyx_k_centdir[] = "centdir"; static const char __pyx_k_close_2[] = "_close"; static const char __pyx_k_comment[] = "comment"; static const char __pyx_k_deflate[] = "deflate"; static const char __pyx_k_dirname[] = "dirname"; static const char __pyx_k_dirsize[] = "dirsize"; static const char __pyx_k_extract[] = "--extract"; static const char __pyx_k_fheader[] = "fheader"; static const char __pyx_k_fileobj[] = "fileobj"; static const char __pyx_k_filepos[] = "filepos"; static const char __pyx_k_filters[] = "filters"; static const char __pyx_k_fpclose[] = "_fpclose"; static const char __pyx_k_gen_crc[] = "_gen_crc"; static const char __pyx_k_genexpr[] = "genexpr"; static const char __pyx_k_getinfo[] = "getinfo"; static const char __pyx_k_implode[] = "implode"; static const char __pyx_k_is_file[] = "is_file"; static const char __pyx_k_iterdir[] = "iterdir"; static const char __pyx_k_members[] = "members"; static const char __pyx_k_metavar[] = "metavar"; static const char __pyx_k_minuend[] = "minuend"; static const char __pyx_k_new_pos[] = "new_pos"; static const char __pyx_k_newdata[] = "newdata"; static const char __pyx_k_parents[] = "_parents"; static const char __pyx_k_prepare[] = "__prepare__"; static const char __pyx_k_read1_2[] = "read1"; static const char __pyx_k_recData[] = "recData"; static const char __pyx_k_replace[] = "replace"; static const char __pyx_k_size_cd[] = "size_cd"; static const char __pyx_k_testzip[] = "testzip"; static const char __pyx_k_truediv[] = "__truediv__"; static const char __pyx_k_wavpack[] = "wavpack"; static const char __pyx_k_zipfile[] = "<zipfile>"; static const char __pyx_k_zipinfo[] = "zipinfo"; static const char __pyx_k_DEFLATED[] = "DEFLATED"; static const char __pyx_k_ECD_SIZE[] = "_ECD_SIZE"; static const char __pyx_k_EOFError[] = "EOFError"; static const char __pyx_k_KeyError[] = "KeyError"; static const char __pyx_k_Modified[] = "Modified "; static const char __pyx_k_PathLike[] = "PathLike"; static const char __pyx_k_Tellable[] = "_Tellable"; static const char __pyx_k_ZIP_LZMA[] = "ZIP_LZMA"; static const char __pyx_k_ancestry[] = "_ancestry"; static const char __pyx_k_argparse[] = "argparse"; static const char __pyx_k_basename[] = "basename"; static const char __pyx_k_binascii[] = "binascii"; static const char __pyx_k_calcsize[] = "calcsize"; static const char __pyx_k_closed_2[] = " [closed]"; static const char __pyx_k_compress[] = "compress"; static const char __pyx_k_contains[] = "__contains__"; static const char __pyx_k_crctable[] = "_crctable"; static const char __pyx_k_curr_pos[] = "curr_pos"; static const char __pyx_k_dircount[] = "dircount"; static const char __pyx_k_disk_dir[] = "disk_dir"; static const char __pyx_k_disk_num[] = "disk_num"; static const char __pyx_k_endswith[] = "endswith"; static const char __pyx_k_filelist[] = "filelist"; static const char __pyx_k_filemode[] = "filemode"; static const char __pyx_k_filename[] = "filename"; static const char __pyx_k_filesize[] = "filesize"; static const char __pyx_k_fromkeys[] = "fromkeys"; static const char __pyx_k_inferred[] = "inferred"; static const char __pyx_k_infolist[] = "infolist"; static const char __pyx_k_is_child[] = "_is_child"; static const char __pyx_k_joinpath[] = "joinpath"; static const char __pyx_k_makedirs[] = "makedirs"; static const char __pyx_k_modeDict[] = "modeDict"; static const char __pyx_k_modified[] = "modified"; static const char __pyx_k_name_set[] = "_name_set"; static const char __pyx_k_namelist[] = "namelist"; static const char __pyx_k_newlines[] = "newlines"; static const char __pyx_k_normpath[] = "normpath"; static const char __pyx_k_offset_2[] = "_offset"; static const char __pyx_k_platform[] = "platform"; static const char __pyx_k_printdir[] = "printdir"; static const char __pyx_k_property[] = "property"; static const char __pyx_k_qualname[] = "__qualname__"; static const char __pyx_k_raw_time[] = "_raw_time"; static const char __pyx_k_read_len[] = "read_len"; static const char __pyx_k_readable[] = "readable"; static const char __pyx_k_readline[] = "readline"; static const char __pyx_k_required[] = "required"; static const char __pyx_k_reserved[] = "reserved"; static const char __pyx_k_seekable[] = "seekable"; static const char __pyx_k_suppress[] = "suppress"; static const char __pyx_k_tokenize[] = "tokenize"; static const char __pyx_k_warnings[] = "warnings"; static const char __pyx_k_zef_file[] = "zef_file"; static const char __pyx_k_zip_mode[] = "zip_mode"; static const char __pyx_k_4sQ2H2L4Q[] = "<4sQ2H2L4Q"; static const char __pyx_k_File_Name[] = "File Name"; static const char __pyx_k_File_size[] = "File size"; static const char __pyx_k_Path_name[] = "Path.name"; static const char __pyx_k_Path_open[] = "Path.open"; static const char __pyx_k_PyZipFile[] = "PyZipFile"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_ZIP_BZIP2[] = "ZIP_BZIP2"; static const char __pyx_k_comment_2[] = "_comment"; static const char __pyx_k_date_time[] = "date_time"; static const char __pyx_k_decrypter[] = "decrypter"; static const char __pyx_k_deflate64[] = "deflate64"; static const char __pyx_k_didModify[] = "_didModify"; static const char __pyx_k_dir_match[] = "dir_match"; static const char __pyx_k_dircount2[] = "dircount2"; static const char __pyx_k_diroffset[] = "diroffset"; static const char __pyx_k_extract_2[] = "extract"; static const char __pyx_k_file_size[] = "file_size"; static const char __pyx_k_fileobj_2[] = "_fileobj"; static const char __pyx_k_flag_bits[] = "flag_bits"; static const char __pyx_k_fname_str[] = "fname_str"; static const char __pyx_k_importlib[] = "importlib"; static const char __pyx_k_itertools[] = "itertools"; static const char __pyx_k_metaclass[] = "__metaclass__"; static const char __pyx_k_not_found[] = " not found."; static const char __pyx_k_null_byte[] = "null_byte"; static const char __pyx_k_offset_cd[] = "offset_cd"; static const char __pyx_k_parent_at[] = "parent_at"; static const char __pyx_k_parents_2[] = "parents"; static const char __pyx_k_posixpath[] = "posixpath"; static const char __pyx_k_read_text[] = "read_text"; static const char __pyx_k_start_dir[] = "start_dir"; static const char __pyx_k_threading[] = "threading"; static const char __pyx_k_traceback[] = "traceback"; static const char __pyx_k_upperdirs[] = "upperdirs"; static const char __pyx_k_BadZipFile[] = "BadZipFile"; static const char __pyx_k_BadZipfile[] = "BadZipfile"; static const char __pyx_k_ECD_OFFSET[] = "_ECD_OFFSET"; static const char __pyx_k_EndRecData[] = "_EndRecData"; static const char __pyx_k_FORMAT_RAW[] = "FORMAT_RAW"; static const char __pyx_k_FastLookup[] = "FastLookup"; static const char __pyx_k_NameToInfo[] = "NameToInfo"; static const char __pyx_k_Path___str[] = "Path.__str__"; static const char __pyx_k_Path__next[] = "Path._next"; static const char __pyx_k_Path__repr[] = "_Path__repr"; static const char __pyx_k_SharedFile[] = "_SharedFile"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_ZIP_STORED[] = "ZIP_STORED"; static const char __pyx_k_ZipExtFile[] = "ZipExtFile"; static const char __pyx_k_allowZip64[] = "allowZip64"; static const char __pyx_k_and_header[] = " and header "; static const char __pyx_k_check_byte[] = "check_byte"; static const char __pyx_k_chunk_size[] = "chunk_size"; static const char __pyx_k_contextlib[] = "contextlib"; static const char __pyx_k_crctable_2[] = "crctable"; static const char __pyx_k_decompress[] = "decompress"; static const char __pyx_k_difference[] = "_difference"; static const char __pyx_k_extractall[] = "extractall"; static const char __pyx_k_filePassed[] = "_filePassed"; static const char __pyx_k_fileRefCnt[] = "_fileRefCnt"; static const char __pyx_k_filemode_r[] = " filemode=%r"; static const char __pyx_k_filename_2[] = " filename="; static const char __pyx_k_filename_r[] = " filename=%r"; static const char __pyx_k_is_zipfile[] = "is_zipfile"; static const char __pyx_k_output_dir[] = "<output_dir>"; static const char __pyx_k_parse_args[] = "parse_args"; static const char __pyx_k_read_bytes[] = "read_bytes"; static const char __pyx_k_readbuffer[] = "_readbuffer"; static const char __pyx_k_seekable_2[] = "_seekable"; static const char __pyx_k_splitdrive[] = "splitdrive"; static const char __pyx_k_stacklevel[] = "stacklevel"; static const char __pyx_k_subtrahend[] = "subtrahend"; static const char __pyx_k_targetpath[] = "targetpath"; static const char __pyx_k_unconsumed[] = "_unconsumed"; static const char __pyx_k_update_crc[] = "_update_crc"; static const char __pyx_k_4s2B4HL2L2H[] = "<4s2B4HL2L2H"; static const char __pyx_k_ECD_COMMENT[] = "_ECD_COMMENT"; static const char __pyx_k_ImportError[] = "ImportError"; static const char __pyx_k_Path___init[] = "Path.__init__"; static const char __pyx_k_Path___repr[] = "Path.__repr__"; static const char __pyx_k_Path_exists[] = "Path.exists"; static const char __pyx_k_Path_is_dir[] = "Path.is_dir"; static const char __pyx_k_Path_parent[] = "Path.parent"; static const char __pyx_k_ZIP64_LIMIT[] = "ZIP64_LIMIT"; static const char __pyx_k_buff_offset[] = "buff_offset"; static const char __pyx_k_commentSize[] = "commentSize"; static const char __pyx_k_compression[] = "compression"; static const char __pyx_k_compressobj[] = "compressobj"; static const char __pyx_k_copyfileobj[] = "copyfileobj"; static const char __pyx_k_decodeExtra[] = "_decodeExtra"; static const char __pyx_k_decrypter_2[] = "_decrypter"; static const char __pyx_k_description[] = "description"; static const char __pyx_k_file_size_r[] = " file_size=%r"; static const char __pyx_k_filterfalse[] = "filterfalse"; static const char __pyx_k_force_zip64[] = "force_zip64"; static const char __pyx_k_read_offset[] = "read_offset"; static const char __pyx_k_resolve_dir[] = "resolve_dir"; static const char __pyx_k_running_crc[] = "_running_crc"; static const char __pyx_k_setpassword[] = "setpassword"; static const char __pyx_k_strip_extra[] = "_strip_extra"; static const char __pyx_k_update_keys[] = "update_keys"; static const char __pyx_k_CD_FLAG_BITS[] = "_CD_FLAG_BITS"; static const char __pyx_k_CD_SIGNATURE[] = "_CD_SIGNATURE"; static const char __pyx_k_CompleteDirs[] = "CompleteDirs"; static const char __pyx_k_DD_SIGNATURE[] = "_DD_SIGNATURE"; static const char __pyx_k_Done_testing[] = "Done testing"; static const char __pyx_k_ECD_LOCATION[] = "_ECD_LOCATION"; static const char __pyx_k_EndRecData64[] = "_EndRecData64"; static const char __pyx_k_FH_SIGNATURE[] = "_FH_SIGNATURE"; static const char __pyx_k_FILTER_LZMA1[] = "FILTER_LZMA1"; static const char __pyx_k_LZMA_VERSION[] = "LZMA_VERSION"; static const char __pyx_k_LargeZipFile[] = "LargeZipFile"; static const char __pyx_k_Path_is_file[] = "Path.is_file"; static const char __pyx_k_Path_iterdir[] = "Path.iterdir"; static const char __pyx_k_RuntimeError[] = "RuntimeError"; static const char __pyx_k_ZIP_DEFLATED[] = "ZIP_DEFLATED"; static const char __pyx_k_ZipDecrypter[] = "_ZipDecrypter"; static const char __pyx_k_ZipFile_open[] = "ZipFile.open"; static const char __pyx_k_ZipFile_read[] = "ZipFile.read"; static const char __pyx_k_add_argument[] = "add_argument"; static const char __pyx_k_allowZip64_2[] = "_allowZip64"; static const char __pyx_k_decompressor[] = "_decompressor"; static const char __pyx_k_expected_crc[] = "_expected_crc"; static const char __pyx_k_implied_dirs[] = "_implied_dirs"; static const char __pyx_k_is_encrypted[] = "is_encrypted"; static const char __pyx_k_read_version[] = "read_version"; static const char __pyx_k_staticmethod[] = "staticmethod"; static const char __pyx_k_turbozipfile[] = "turbozipfile"; static const char __pyx_k_4s4B4HL2L5H2L[] = "<4s4B4HL2L5H2L"; static const char __pyx_k_BZ2Compressor[] = "BZ2Compressor"; static const char __pyx_k_BZIP2_VERSION[] = "BZIP2_VERSION"; static const char __pyx_k_Compress_size[] = "Compress size"; static const char __pyx_k_ECD_SIGNATURE[] = "_ECD_SIGNATURE"; static const char __pyx_k_Header_offset[] = "Header offset"; static const char __pyx_k_MAX_SEEK_READ[] = "MAX_SEEK_READ"; static const char __pyx_k_MIN_READ_SIZE[] = "MIN_READ_SIZE"; static const char __pyx_k_Path_joinpath[] = "Path.joinpath"; static const char __pyx_k_Tellable_tell[] = "_Tellable.tell"; static const char __pyx_k_TextIOWrapper[] = "TextIOWrapper"; static const char __pyx_k_ZIP64_VERSION[] = "ZIP64_VERSION"; static const char __pyx_k_ZipFile___del[] = "ZipFile.__del__"; static const char __pyx_k_ZipFile_close[] = "ZipFile.close"; static const char __pyx_k_check_zipfile[] = "_check_zipfile"; static const char __pyx_k_close_fileobj[] = "close_fileobj"; static const char __pyx_k_compress_left[] = "_compress_left"; static const char __pyx_k_compress_size[] = "compress_size"; static const char __pyx_k_compress_type[] = "compress_type"; static const char __pyx_k_compresslevel[] = "_compresslevel"; static const char __pyx_k_create_system[] = "create_system"; static const char __pyx_k_decompressobj[] = "decompressobj"; static const char __pyx_k_external_attr[] = "external_attr"; static const char __pyx_k_from_iterable[] = "from_iterable"; static const char __pyx_k_header_offset[] = "header_offset"; static const char __pyx_k_internal_attr[] = "internal_attr"; static const char __pyx_k_orig_filename[] = "orig_filename"; static const char __pyx_k_ArgumentParser[] = "ArgumentParser"; static const char __pyx_k_AttributeError[] = "AttributeError"; static const char __pyx_k_BufferedIOBase[] = "BufferedIOBase"; static const char __pyx_k_CD64_SIGNATURE[] = "_CD64_SIGNATURE"; static const char __pyx_k_ECD_DISK_START[] = "_ECD_DISK_START"; static const char __pyx_k_LZMACompressor[] = "LZMACompressor"; static const char __pyx_k_Path__is_child[] = "Path._is_child"; static const char __pyx_k_Path_read_text[] = "Path.read_text"; static const char __pyx_k_Tellable_close[] = "_Tellable.close"; static const char __pyx_k_Tellable_flush[] = "_Tellable.flush"; static const char __pyx_k_Tellable_write[] = "_Tellable.write"; static const char __pyx_k_ZipFile___exit[] = "ZipFile.__exit__"; static const char __pyx_k_ZipFile___init[] = "ZipFile.__init__"; static const char __pyx_k_ZipFile___repr[] = "ZipFile.__repr__"; static const char __pyx_k_ZipInfo___init[] = "ZipInfo.__init__"; static const char __pyx_k_ZipInfo___repr[] = "ZipInfo.__repr__"; static const char __pyx_k_ZipInfo_is_dir[] = "ZipInfo.is_dir"; static const char __pyx_k_create_version[] = "create_version"; static const char __pyx_k_extract_member[] = "_extract_member"; static const char __pyx_k_get_compressor[] = "_get_compressor"; static const char __pyx_k_importlib_util[] = "importlib.util"; static const char __pyx_k_init_decrypter[] = "_init_decrypter"; static const char __pyx_k_orig_file_size[] = "_orig_file_size"; static const char __pyx_k_orig_start_crc[] = "_orig_start_crc"; static const char __pyx_k_sizeCentralDir[] = "sizeCentralDir"; static const char __pyx_k_sizeEndCentDir[] = "sizeEndCentDir"; static const char __pyx_k_sizeFileHeader[] = "sizeFileHeader"; static const char __pyx_k_BZ2Decompressor[] = "BZ2Decompressor"; static const char __pyx_k_DEFAULT_VERSION[] = "DEFAULT_VERSION"; static const char __pyx_k_ECD_DISK_NUMBER[] = "_ECD_DISK_NUMBER"; static const char __pyx_k_Path_read_bytes[] = "Path.read_bytes"; static const char __pyx_k_RealGetContents[] = "_RealGetContents"; static const char __pyx_k_SharedFile_read[] = "_SharedFile.read"; static const char __pyx_k_SharedFile_seek[] = "_SharedFile.seek"; static const char __pyx_k_Tellable___init[] = "_Tellable.__init__"; static const char __pyx_k_ZIP_MAX_COMMENT[] = "ZIP_MAX_COMMENT"; static const char __pyx_k_ZipExtFile_peek[] = "ZipExtFile.peek"; static const char __pyx_k_ZipExtFile_read[] = "ZipExtFile.read"; static const char __pyx_k_ZipExtFile_seek[] = "ZipExtFile.seek"; static const char __pyx_k_ZipExtFile_tell[] = "ZipExtFile.tell"; static const char __pyx_k_ZipFile___enter[] = "ZipFile.__enter__"; static const char __pyx_k_ZipFile_comment[] = "ZipFile.comment"; static const char __pyx_k_ZipFile_extract[] = "ZipFile.extract"; static const char __pyx_k_ZipFile_getinfo[] = "ZipFile.getinfo"; static const char __pyx_k_ZipFile_testzip[] = "ZipFile.testzip"; static const char __pyx_k_close_fileobj_2[] = "_close_fileobj"; static const char __pyx_k_compress_size_r[] = " compress_size=%r"; static const char __pyx_k_compress_type_2[] = "_compress_type"; static const char __pyx_k_compress_type_s[] = " compress_type=%s"; static const char __pyx_k_compresslevel_2[] = "compresslevel"; static const char __pyx_k_external_attr_x[] = " external_attr=%#x"; static const char __pyx_k_extract_version[] = "extract_version"; static const char __pyx_k_maxCommentStart[] = "maxCommentStart"; static const char __pyx_k_turbozipfile_py[] = "turbozipfile.py"; static const char __pyx_k_unconsumed_tail[] = "unconsumed_tail"; static const char __pyx_k_CD64_DISK_NUMBER[] = "_CD64_DISK_NUMBER"; static const char __pyx_k_CD_COMPRESS_TYPE[] = "_CD_COMPRESS_TYPE"; static const char __pyx_k_CD_CREATE_SYSTEM[] = "_CD_CREATE_SYSTEM"; static const char __pyx_k_ECD_COMMENT_SIZE[] = "_ECD_COMMENT_SIZE"; static const char __pyx_k_FH_LAST_MOD_DATE[] = "_FH_LAST_MOD_DATE"; static const char __pyx_k_FH_LAST_MOD_TIME[] = "_FH_LAST_MOD_TIME"; static const char __pyx_k_LZMADecompressor[] = "LZMADecompressor"; static const char __pyx_k_SharedFile_close[] = "_SharedFile.close"; static const char __pyx_k_ZipExtFile_close[] = "ZipExtFile.close"; static const char __pyx_k_ZipExtFile_read1[] = "ZipExtFile.read1"; static const char __pyx_k_ZipFile__fpclose[] = "ZipFile._fpclose"; static const char __pyx_k_ZipFile_infolist[] = "ZipFile.infolist"; static const char __pyx_k_ZipFile_namelist[] = "ZipFile.namelist"; static const char __pyx_k_ZipFile_printdir[] = "ZipFile.printdir"; static const char __pyx_k_compression_type[] = "compression type "; static const char __pyx_k_compressor_names[] = "compressor_names"; static const char __pyx_k_get_decompressor[] = "_get_decompressor"; static const char __pyx_k_sizeEndCentDir64[] = "sizeEndCentDir64"; static const char __pyx_k_stringCentralDir[] = "stringCentralDir"; static const char __pyx_k_stringEndArchive[] = "stringEndArchive"; static const char __pyx_k_stringFileHeader[] = "stringFileHeader"; static const char __pyx_k_structCentralDir[] = "structCentralDir"; static const char __pyx_k_structEndArchive[] = "structEndArchive"; static const char __pyx_k_structFileHeader[] = "structFileHeader"; static const char __pyx_k_CD_COMMENT_LENGTH[] = "_CD_COMMENT_LENGTH"; static const char __pyx_k_CD_CREATE_VERSION[] = "_CD_CREATE_VERSION"; static const char __pyx_k_CD_EXTRACT_SYSTEM[] = "_CD_EXTRACT_SYSTEM"; static const char __pyx_k_CompleteDirs_make[] = "CompleteDirs.make"; static const char __pyx_k_ECD_ENTRIES_TOTAL[] = "_ECD_ENTRIES_TOTAL"; static const char __pyx_k_FH_EXTRACT_SYSTEM[] = "_FH_EXTRACT_SYSTEM"; static const char __pyx_k_FastLookup__names[] = "_FastLookup__names"; static const char __pyx_k_SharedFile___init[] = "_SharedFile.__init__"; static const char __pyx_k_ZipExtFile___init[] = "ZipExtFile.__init__"; static const char __pyx_k_ZipExtFile___repr[] = "ZipExtFile.__repr__"; static const char __pyx_k_ZipExtFile__read1[] = "ZipExtFile._read1"; static const char __pyx_k_ZipExtFile__read2[] = "ZipExtFile._read2"; static const char __pyx_k_check_compression[] = "_check_compression"; static const char __pyx_k_parents_line_1455[] = "_parents (line 1455)"; static const char __pyx_k_strict_timestamps[] = "strict_timestamps"; static const char __pyx_k_CD_COMPRESSED_SIZE[] = "_CD_COMPRESSED_SIZE"; static const char __pyx_k_CD_EXTRACT_VERSION[] = "_CD_EXTRACT_VERSION"; static const char __pyx_k_CD_FILENAME_LENGTH[] = "_CD_FILENAME_LENGTH"; static const char __pyx_k_EXTRA_FIELD_STRUCT[] = "_EXTRA_FIELD_STRUCT"; static const char __pyx_k_FH_COMPRESSED_SIZE[] = "_FH_COMPRESSED_SIZE"; static const char __pyx_k_FH_EXTRACT_VERSION[] = "_FH_EXTRACT_VERSION"; static const char __pyx_k_FH_FILENAME_LENGTH[] = "_FH_FILENAME_LENGTH"; static const char __pyx_k_FastLookup__lookup[] = "_FastLookup__lookup"; static const char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError"; static const char __pyx_k_ZipFile_extractall[] = "ZipFile.extractall"; static const char __pyx_k_ancestry_line_1473[] = "_ancestry (line 1473)"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_invalid_path_parts[] = "invalid_path_parts"; static const char __pyx_k_orig_compress_size[] = "_orig_compress_size"; static const char __pyx_k_stringEndArchive64[] = "stringEndArchive64"; static const char __pyx_k_structEndArchive64[] = "structEndArchive64"; static const char __pyx_k_CD64_CREATE_VERSION[] = "_CD64_CREATE_VERSION"; static const char __pyx_k_CD64_DIRECTORY_SIZE[] = "_CD64_DIRECTORY_SIZE"; static const char __pyx_k_Corrupt_extra_field[] = "Corrupt extra field "; static const char __pyx_k_FastLookup_namelist[] = "FastLookup.namelist"; static const char __pyx_k_MAX_EXTRACT_VERSION[] = "MAX_EXTRACT_VERSION"; static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; static const char __pyx_k_ZIP_FILECOUNT_LIMIT[] = "ZIP_FILECOUNT_LIMIT"; static const char __pyx_k_ZipExtFile_readable[] = "ZipExtFile.readable"; static const char __pyx_k_ZipExtFile_readline[] = "ZipExtFile.readline"; static const char __pyx_k_ZipExtFile_seekable[] = "ZipExtFile.seekable"; static const char __pyx_k_ZipFile_setpassword[] = "ZipFile.setpassword"; static const char __pyx_k_orig_compress_start[] = "_orig_compress_start"; static const char __pyx_k_seek_on_closed_file[] = "seek on closed file."; static const char __pyx_k_strict_timestamps_2[] = "_strict_timestamps"; static const char __pyx_k_tell_on_closed_file[] = "tell on closed file."; static const char __pyx_k_zip_file_version_1f[] = "zip file version %.1f"; static const char __pyx_k_CD64_EXTRACT_VERSION[] = "_CD64_EXTRACT_VERSION"; static const char __pyx_k_CD_DISK_NUMBER_START[] = "_CD_DISK_NUMBER_START"; static const char __pyx_k_CD_UNCOMPRESSED_SIZE[] = "_CD_UNCOMPRESSED_SIZE"; static const char __pyx_k_Can_t_listdir_a_file[] = "Can't listdir a file"; static const char __pyx_k_FH_UNCOMPRESSED_SIZE[] = "_FH_UNCOMPRESSED_SIZE"; static const char __pyx_k_FastLookup__name_set[] = "FastLookup._name_set"; static const char __pyx_k_LZMACompressor__init[] = "LZMACompressor._init"; static const char __pyx_k_LZMACompressor_flush[] = "LZMACompressor.flush"; static const char __pyx_k_UnsupportedOperation[] = "UnsupportedOperation"; static const char __pyx_k_ZipInfo__decodeExtra[] = "ZipInfo._decodeExtra"; static const char __pyx_k_Bad_CRC_32_for_file_r[] = "Bad CRC-32 for file %r"; static const char __pyx_k_CD_EXTRA_FIELD_LENGTH[] = "_CD_EXTRA_FIELD_LENGTH"; static const char __pyx_k_CompleteDirs_namelist[] = "CompleteDirs.namelist"; static const char __pyx_k_ECD_ENTRIES_THIS_DISK[] = "_ECD_ENTRIES_THIS_DISK"; static const char __pyx_k_FH_COMPRESSION_METHOD[] = "_FH_COMPRESSION_METHOD"; static const char __pyx_k_FH_EXTRA_FIELD_LENGTH[] = "_FH_EXTRA_FIELD_LENGTH"; static const char __pyx_k_LZMACompressor___init[] = "LZMACompressor.__init__"; static const char __pyx_k_Truncated_file_header[] = "Truncated file header"; static const char __pyx_k_Writing_not_supported[] = "Writing not supported"; static const char __pyx_k_Z_DEFAULT_COMPRESSION[] = "Z_DEFAULT_COMPRESSION"; static const char __pyx_k_ZipFile_can_only_read[] = "ZipFile can only read"; static const char __pyx_k_d_02d_02d_02d_02d_02d[] = "%d-%02d-%02d %02d:%02d:%02d"; static const char __pyx_k_given_inferred_offset[] = "given, inferred, offset"; static const char __pyx_k_read_from_closed_file[] = "read from closed file."; static const char __pyx_k_CD64_DIRECTORY_RECSIZE[] = "_CD64_DIRECTORY_RECSIZE"; static const char __pyx_k_CD64_DISK_NUMBER_START[] = "_CD64_DISK_NUMBER_START"; static const char __pyx_k_CD_LOCAL_HEADER_OFFSET[] = "_CD_LOCAL_HEADER_OFFSET"; static const char __pyx_k_CompleteDirs__name_set[] = "CompleteDirs._name_set"; static const char __pyx_k_File_is_not_a_zip_file[] = "File is not a zip file"; static const char __pyx_k_File_name_in_directory[] = "File name in directory "; static const char __pyx_k_ZipExtFile__update_crc[] = "ZipExtFile._update_crc"; static const char __pyx_k_Bad_password_for_file_r[] = "Bad password for file %r"; static const char __pyx_k_LZMACompressor_compress[] = "LZMACompressor.compress"; static const char __pyx_k_LZMADecompressor___init[] = "LZMADecompressor.__init__"; static const char __pyx_k_ZipFile__extract_member[] = "ZipFile._extract_member"; static const char __pyx_k_sizeEndCentDir64Locator[] = "sizeEndCentDir64Locator"; static const char __pyx_k_CompleteDirs_resolve_dir[] = "CompleteDirs.resolve_dir"; static const char __pyx_k_Read_and_write_ZIP_files[] = "Read and write ZIP files."; static const char __pyx_k_ZipFile__RealGetContents[] = "ZipFile._RealGetContents"; static const char __pyx_k_decode_filter_properties[] = "_decode_filter_properties"; static const char __pyx_k_encode_filter_properties[] = "_encode_filter_properties"; static const char __pyx_k_pwd_expected_bytes_got_s[] = "pwd: expected bytes, got %s"; static const char __pyx_k_CD64_NUMBER_ENTRIES_TOTAL[] = "_CD64_NUMBER_ENTRIES_TOTAL"; static const char __pyx_k_CD64_OFFSET_START_CENTDIR[] = "_CD64_OFFSET_START_CENTDIR"; static const char __pyx_k_Corrupt_zip64_extra_field[] = "Corrupt zip64 extra field. "; static const char __pyx_k_Show_listing_of_a_zipfile[] = "Show listing of a zipfile"; static const char __pyx_k_ZipDecrypter_locals_crc32[] = "_ZipDecrypter.<locals>.crc32"; static const char __pyx_k_stringEndArchive64Locator[] = "stringEndArchive64Locator"; static const char __pyx_k_structEndArchive64Locator[] = "structEndArchive64Locator"; static const char __pyx_k_CompleteDirs__implied_dirs[] = "CompleteDirs._implied_dirs"; static const char __pyx_k_Test_if_a_zipfile_is_valid[] = "Test if a zipfile is valid"; static const char __pyx_k_ZipExtFile__init_decrypter[] = "ZipExtFile._init_decrypter"; static const char __pyx_k_CD_EXTERNAL_FILE_ATTRIBUTES[] = "_CD_EXTERNAL_FILE_ATTRIBUTES"; static const char __pyx_k_CD_INTERNAL_FILE_ATTRIBUTES[] = "_CD_INTERNAL_FILE_ATTRIBUTES"; static const char __pyx_k_LZMADecompressor_decompress[] = "LZMADecompressor.decompress"; static const char __pyx_k_Truncated_central_directory[] = "Truncated central directory"; static const char __pyx_k_FH_GENERAL_PURPOSE_FLAG_BITS[] = "_FH_GENERAL_PURPOSE_FLAG_BITS"; static const char __pyx_k_I_O_operation_on_closed_file[] = "I/O operation on closed file."; static const char __pyx_k_add_mutually_exclusive_group[] = "add_mutually_exclusive_group"; static const char __pyx_k_comment_expected_bytes_got_s[] = "comment: expected bytes, got %s"; static const char __pyx_k_strong_encryption_flag_bit_6[] = "strong encryption (flag bit 6)"; static const char __pyx_k_CD64_NUMBER_ENTRIES_THIS_DISK[] = "_CD64_NUMBER_ENTRIES_THIS_DISK"; static const char __pyx_k_ZipDecrypter_locals_decrypter[] = "_ZipDecrypter.<locals>.decrypter"; static const char __pyx_k_A_pathlib_compatible_interface[] = "\n A pathlib-compatible interface for zip files.\n Consider a zip file with this structure::\n .\n \342\224\234\342\224\200\342\224\200 a.txt\n \342\224\224\342\224\200\342\224\200 b\n \342\224\234\342\224\200\342\224\200 c.txt\n \342\224\224\342\224\200\342\224\200 d\n \342\224\224\342\224\200\342\224\200 e.txt\n >>> data = io.BytesIO()\n >>> zf = ZipFile(data, 'w')\n >>> zf.writestr('a.txt', 'content of a')\n >>> zf.writestr('b/c.txt', 'content of c')\n >>> zf.writestr('b/d/e.txt', 'content of e')\n >>> zf.filename = 'abcde.zip'\n Path accepts the zipfile object itself or a filename\n >>> root = Path(zf)\n From there, several path operations are available.\n Directory iteration (including the zip file itself):\n >>> a, b = root.iterdir()\n >>> a\n Path('abcde.zip', 'a.txt')\n >>> b\n Path('abcde.zip', 'b/')\n name property:\n >>> b.name\n 'b'\n join with divide operator:\n >>> c = b / 'c.txt'\n >>> c\n Path('abcde.zip', 'b/c.txt')\n >>> c.name\n 'c.txt'\n Read text:\n >>> c.read_text()\n 'content of c'\n existence:\n >>> c.exists()\n True\n >>> (b / 'missing.txt').exists()\n False\n Coercion to string:\n >>> str(c)\n 'abcde.zip/b/c.txt'\n "; static const char __pyx_k_A_ZipFile_subclass_that_ensures[] = "\n A ZipFile subclass that ensures that implied directories\n are always included in the namelist.\n "; static const char __pyx_k_A_simple_command_line_interface[] = "A simple command-line interface for zipfile module."; static const char __pyx_k_Attempt_to_use_ZIP_archive_that[] = "Attempt to use ZIP archive that was already closed"; static const char __pyx_k_Class_with_methods_to_open_read[] = " Class with methods to open, read, write, close, list zip files.\n\n z = ZipFile(file, mode=\"r\", compression=ZIP_STORED, allowZip64=True,\n compresslevel=None)\n file: Either the path to the file, or a file-like object.\n If it is a path, the file will be opened and closed by ZipFile.\n mode: The mode can be either read 'r', write 'w', exclusive create 'x',\n or append 'a'.\n compression: ZIP_STORED (no compression), ZIP_DEFLATED (requires zlib),\n ZIP_BZIP2 (requires bz2) or ZIP_LZMA (requires lzma).\n allowZip64: if True ZipFile will create files with ZIP64 extensions when\n needed, otherwise it will raise an exception when this would\n be necessary.\n compresslevel: None (default for the given compression type) or an integer\n specifying the level to pass to the compressor.\n When using ZIP_STORED or ZIP_LZMA this keyword has no effect.\n When using ZIP_DEFLATED integers 0 through 9 are accepted.\n When using ZIP_BZIP2 integers 1 through 9 are accepted.\n "; static const char __pyx_k_Extract_zipfile_into_target_dir[] = "Extract zipfile into target dir"; static const char __pyx_k_File_like_object_for_reading_an[] = "File-like object for reading an archive member.\n\n Is returned by ZipFile.open().\n "; static const char __pyx_k_Given_a_path_with_elements_sepa[] = "\n Given a path with elements separated by\n posixpath.sep, generate all parents of that path.\n >>> list(_parents('b/d'))\n ['b']\n >>> list(_parents('/b/d/'))\n ['/b']\n >>> list(_parents('b/d/f/'))\n ['b/d', 'b']\n >>> list(_parents('b'))\n []\n >>> list(_parents(''))\n []\n "; static const char __pyx_k_Raised_when_writing_a_zipfile_t[] = "\n Raised when writing a zipfile, the zipfile requires ZIP64 extensions\n and those extensions are disabled.\n "; static const char __pyx_k_There_is_no_item_named_r_in_the[] = "There is no item named %r in the archive"; static const char __pyx_k_ZIP_does_not_support_timestamps[] = "ZIP does not support timestamps before 1980"; static const char __pyx_k_ZipDecrypter_locals_update_keys[] = "_ZipDecrypter.<locals>.update_keys"; static const char __pyx_k_ZipFile_subclass_to_ensure_impl[] = "\n ZipFile subclass to ensure implicit\n dirs exist and are resolved rapidly.\n "; static const char __pyx_k_self___class_____name___self_ro[] = "{self.__class__.__name__}({self.root.filename!r}, {self.at!r})"; static const char __pyx_k_whence_must_be_os_SEEK_SET_0_os[] = "whence must be os.SEEK_SET (0), os.SEEK_CUR (1), or os.SEEK_END (2)"; static const char __pyx_k_windows_illegal_name_trans_tabl[] = "_windows_illegal_name_trans_table"; static const char __pyx_k_Archive_comment_is_too_long_trun[] = "Archive comment is too long; truncating to %d bytes"; static const char __pyx_k_Bad_magic_number_for_central_dir[] = "Bad magic number for central directory"; static const char __pyx_k_Bad_magic_number_for_file_header[] = "Bad magic number for file header"; static const char __pyx_k_Class_with_attributes_describing[] = "Class with attributes describing each file in the ZIP archive."; static const char __pyx_k_CompleteDirs__implied_dirs_local[] = "CompleteDirs._implied_dirs.<locals>.genexpr"; static const char __pyx_k_Compression_requires_the_missing[] = "Compression requires the (missing) zlib module"; static const char __pyx_k_File_r_is_encrypted_password_req[] = "File %r is encrypted, password required for extraction"; static const char __pyx_k_That_compression_method_is_not_s[] = "That compression method is not supported"; static const char __pyx_k_The_following_enclosed_file_is_c[] = "The following enclosed file is corrupted: {!r}"; static const char __pyx_k_ZipFile__extract_member_locals_g[] = "ZipFile._extract_member.<locals>.genexpr"; static const char __pyx_k_compressed_patched_data_flag_bit[] = "compressed patched data (flag bit 5)"; static const char __pyx_k_encoding_args_invalid_for_binary[] = "encoding args invalid for binary operation"; static const char __pyx_k_underlying_stream_is_not_seekabl[] = "underlying stream is not seekable"; static const char __pyx_k_zipfiles_that_span_multiple_disk[] = "zipfiles that span multiple disks are not supported"; static const char __pyx_k_Given_a_path_with_elements_sepa_2[] = "\n Given a path with elements separated by\n posixpath.sep, generate all elements of that path\n >>> list(_ancestry('b/d'))\n ['b/d', 'b']\n >>> list(_ancestry('/b/d/'))\n ['/b/d', '/b']\n >>> list(_ancestry('b/d/f/'))\n ['b/d/f', 'b/d', 'b']\n >>> list(_ancestry('b'))\n ['b']\n >>> list(_ancestry(''))\n []\n "; static const char __pyx_k_Compression_requires_the_missing_2[] = "Compression requires the (missing) bz2 module"; static const char __pyx_k_Compression_requires_the_missing_3[] = "Compression requires the (missing) lzma module"; static PyObject *__pyx_kp_b_; static PyObject *__pyx_kp_u_; static PyObject *__pyx_kp_u_04x; static PyObject *__pyx_kp_u_12; static PyObject *__pyx_kp_u_12d; static PyObject *__pyx_kp_u_19; static PyObject *__pyx_kp_u_46; static PyObject *__pyx_kp_u_4s2B4HL2L2H; static PyObject *__pyx_kp_u_4s4B4HL2L5H2L; static PyObject *__pyx_kp_b_4s4H2LH; static PyObject *__pyx_kp_u_4sLQL; static PyObject *__pyx_kp_u_4sQ2H2L4Q; static PyObject *__pyx_kp_s_A_ZipFile_subclass_that_ensures; static PyObject *__pyx_kp_s_A_pathlib_compatible_interface; static PyObject *__pyx_kp_u_A_simple_command_line_interface; static PyObject *__pyx_kp_u_Archive_comment_is_too_long_trun; static PyObject *__pyx_n_s_ArgumentParser; static PyObject *__pyx_kp_u_Attempt_to_use_ZIP_archive_that; static PyObject *__pyx_n_s_AttributeError; static PyObject *__pyx_kp_u_BBH; static PyObject *__pyx_n_s_BZ2Compressor; static PyObject *__pyx_n_s_BZ2Decompressor; static PyObject *__pyx_n_s_BZIP2_VERSION; static PyObject *__pyx_n_s_BadZipFile; static PyObject *__pyx_n_u_BadZipFile; static PyObject *__pyx_n_s_BadZipfile; static PyObject *__pyx_n_u_BadZipfile; static PyObject *__pyx_kp_u_Bad_CRC_32_for_file_r; static PyObject *__pyx_kp_u_Bad_magic_number_for_central_dir; static PyObject *__pyx_kp_u_Bad_magic_number_for_file_header; static PyObject *__pyx_kp_u_Bad_password_for_file_r; static PyObject *__pyx_n_s_BufferedIOBase; static PyObject *__pyx_n_s_BytesIO; static PyObject *__pyx_n_s_CD64_CREATE_VERSION; static PyObject *__pyx_n_s_CD64_DIRECTORY_RECSIZE; static PyObject *__pyx_n_s_CD64_DIRECTORY_SIZE; static PyObject *__pyx_n_s_CD64_DISK_NUMBER; static PyObject *__pyx_n_s_CD64_DISK_NUMBER_START; static PyObject *__pyx_n_s_CD64_EXTRACT_VERSION; static PyObject *__pyx_n_s_CD64_NUMBER_ENTRIES_THIS_DISK; static PyObject *__pyx_n_s_CD64_NUMBER_ENTRIES_TOTAL; static PyObject *__pyx_n_s_CD64_OFFSET_START_CENTDIR; static PyObject *__pyx_n_s_CD64_SIGNATURE; static PyObject *__pyx_n_s_CD_COMMENT_LENGTH; static PyObject *__pyx_n_s_CD_COMPRESSED_SIZE; static PyObject *__pyx_n_s_CD_COMPRESS_TYPE; static PyObject *__pyx_n_s_CD_CRC; static PyObject *__pyx_n_s_CD_CREATE_SYSTEM; static PyObject *__pyx_n_s_CD_CREATE_VERSION; static PyObject *__pyx_n_s_CD_DATE; static PyObject *__pyx_n_s_CD_DISK_NUMBER_START; static PyObject *__pyx_n_s_CD_EXTERNAL_FILE_ATTRIBUTES; static PyObject *__pyx_n_s_CD_EXTRACT_SYSTEM; static PyObject *__pyx_n_s_CD_EXTRACT_VERSION; static PyObject *__pyx_n_s_CD_EXTRA_FIELD_LENGTH; static PyObject *__pyx_n_s_CD_FILENAME_LENGTH; static PyObject *__pyx_n_s_CD_FLAG_BITS; static PyObject *__pyx_n_s_CD_INTERNAL_FILE_ATTRIBUTES; static PyObject *__pyx_n_s_CD_LOCAL_HEADER_OFFSET; static PyObject *__pyx_n_s_CD_SIGNATURE; static PyObject *__pyx_n_s_CD_TIME; static PyObject *__pyx_n_s_CD_UNCOMPRESSED_SIZE; static PyObject *__pyx_n_s_CRC; static PyObject *__pyx_n_u_CRC; static PyObject *__pyx_kp_u_Can_t_listdir_a_file; static PyObject *__pyx_kp_s_Class_with_attributes_describing; static PyObject *__pyx_kp_s_Class_with_methods_to_open_read; static PyObject *__pyx_n_s_CompleteDirs; static PyObject *__pyx_n_s_CompleteDirs__implied_dirs; static PyObject *__pyx_n_s_CompleteDirs__implied_dirs_local; static PyObject *__pyx_n_s_CompleteDirs__name_set; static PyObject *__pyx_n_s_CompleteDirs_make; static PyObject *__pyx_n_s_CompleteDirs_namelist; static PyObject *__pyx_n_s_CompleteDirs_resolve_dir; static PyObject *__pyx_kp_u_Compress_size; static PyObject *__pyx_kp_u_Compression_requires_the_missing; static PyObject *__pyx_kp_u_Compression_requires_the_missing_2; static PyObject *__pyx_kp_u_Compression_requires_the_missing_3; static PyObject *__pyx_kp_u_Corrupt_extra_field; static PyObject *__pyx_kp_u_Corrupt_zip64_extra_field; static PyObject *__pyx_n_s_DD_SIGNATURE; static PyObject *__pyx_n_s_DEFAULT_VERSION; static PyObject *__pyx_n_s_DEFLATED; static PyObject *__pyx_kp_u_Done_testing; static PyObject *__pyx_n_s_ECD_COMMENT; static PyObject *__pyx_n_s_ECD_COMMENT_SIZE; static PyObject *__pyx_n_s_ECD_DISK_NUMBER; static PyObject *__pyx_n_s_ECD_DISK_START; static PyObject *__pyx_n_s_ECD_ENTRIES_THIS_DISK; static PyObject *__pyx_n_s_ECD_ENTRIES_TOTAL; static PyObject *__pyx_n_s_ECD_LOCATION; static PyObject *__pyx_n_s_ECD_OFFSET; static PyObject *__pyx_n_s_ECD_SIGNATURE; static PyObject *__pyx_n_s_ECD_SIZE; static PyObject *__pyx_n_s_EOFError; static PyObject *__pyx_n_s_EXTRA_FIELD_STRUCT; static PyObject *__pyx_n_s_EndRecData; static PyObject *__pyx_n_s_EndRecData64; static PyObject *__pyx_kp_u_Extract_zipfile_into_target_dir; static PyObject *__pyx_n_s_FH_COMPRESSED_SIZE; static PyObject *__pyx_n_s_FH_COMPRESSION_METHOD; static PyObject *__pyx_n_s_FH_CRC; static PyObject *__pyx_n_s_FH_EXTRACT_SYSTEM; static PyObject *__pyx_n_s_FH_EXTRACT_VERSION; static PyObject *__pyx_n_s_FH_EXTRA_FIELD_LENGTH; static PyObject *__pyx_n_s_FH_FILENAME_LENGTH; static PyObject *__pyx_n_s_FH_GENERAL_PURPOSE_FLAG_BITS; static PyObject *__pyx_n_s_FH_LAST_MOD_DATE; static PyObject *__pyx_n_s_FH_LAST_MOD_TIME; static PyObject *__pyx_n_s_FH_SIGNATURE; static PyObject *__pyx_n_s_FH_UNCOMPRESSED_SIZE; static PyObject *__pyx_n_s_FILTER_LZMA1; static PyObject *__pyx_n_s_FORMAT_RAW; static PyObject *__pyx_n_s_FastLookup; static PyObject *__pyx_n_s_FastLookup__lookup; static PyObject *__pyx_n_s_FastLookup__name_set; static PyObject *__pyx_n_s_FastLookup__names; static PyObject *__pyx_n_s_FastLookup_namelist; static PyObject *__pyx_kp_u_File_Name; static PyObject *__pyx_kp_u_File_is_not_a_zip_file; static PyObject *__pyx_kp_s_File_like_object_for_reading_an; static PyObject *__pyx_kp_u_File_name_in_directory; static PyObject *__pyx_kp_u_File_r_is_encrypted_password_req; static PyObject *__pyx_kp_u_File_size; static PyObject *__pyx_kp_u_Given_a_path_with_elements_sepa; static PyObject *__pyx_kp_u_Given_a_path_with_elements_sepa_2; static PyObject *__pyx_kp_u_H; static PyObject *__pyx_kp_u_HH; static PyObject *__pyx_kp_u_Header_offset; static PyObject *__pyx_kp_u_I_O_operation_on_closed_file; static PyObject *__pyx_n_s_ImportError; static PyObject *__pyx_n_s_KeyError; static PyObject *__pyx_n_s_LZMACompressor; static PyObject *__pyx_n_s_LZMACompressor___init; static PyObject *__pyx_n_s_LZMACompressor__init; static PyObject *__pyx_n_s_LZMACompressor_compress; static PyObject *__pyx_n_s_LZMACompressor_flush; static PyObject *__pyx_n_s_LZMADecompressor; static PyObject *__pyx_n_s_LZMADecompressor___init; static PyObject *__pyx_n_s_LZMADecompressor_decompress; static PyObject *__pyx_n_s_LZMA_VERSION; static PyObject *__pyx_n_s_LargeZipFile; static PyObject *__pyx_n_u_LargeZipFile; static PyObject *__pyx_n_s_MAX_EXTRACT_VERSION; static PyObject *__pyx_n_s_MAX_N; static PyObject *__pyx_n_s_MAX_SEEK_READ; static PyObject *__pyx_n_s_MIN_READ_SIZE; static PyObject *__pyx_kp_u_Modified; static PyObject *__pyx_n_s_NameToInfo; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_n_s_OSError; static PyObject *__pyx_kp_b_PK; static PyObject *__pyx_kp_b_PK_2; static PyObject *__pyx_kp_b_PK_3; static PyObject *__pyx_kp_b_PK_4; static PyObject *__pyx_kp_b_PK_5; static PyObject *__pyx_n_s_Path; static PyObject *__pyx_n_u_Path; static PyObject *__pyx_n_s_PathLike; static PyObject *__pyx_n_s_Path___init; static PyObject *__pyx_n_s_Path___repr; static PyObject *__pyx_n_s_Path___str; static PyObject *__pyx_n_s_Path__is_child; static PyObject *__pyx_n_s_Path__next; static PyObject *__pyx_n_s_Path__repr; static PyObject *__pyx_n_s_Path_exists; static PyObject *__pyx_n_s_Path_is_dir; static PyObject *__pyx_n_s_Path_is_file; static PyObject *__pyx_n_s_Path_iterdir; static PyObject *__pyx_n_s_Path_joinpath; static PyObject *__pyx_n_s_Path_name; static PyObject *__pyx_n_s_Path_open; static PyObject *__pyx_n_s_Path_parent; static PyObject *__pyx_n_s_Path_read_bytes; static PyObject *__pyx_n_s_Path_read_text; static PyObject *__pyx_n_u_PyZipFile; static PyObject *__pyx_kp_u_Q; static PyObject *__pyx_n_s_RLock; static PyObject *__pyx_kp_s_Raised_when_writing_a_zipfile_t; static PyObject *__pyx_n_s_RealGetContents; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_SharedFile; static PyObject *__pyx_n_s_SharedFile___init; static PyObject *__pyx_n_s_SharedFile_close; static PyObject *__pyx_n_s_SharedFile_read; static PyObject *__pyx_n_s_SharedFile_seek; static PyObject *__pyx_kp_u_Show_listing_of_a_zipfile; static PyObject *__pyx_n_u_Size; static PyObject *__pyx_n_s_Struct; static PyObject *__pyx_n_s_Tellable; static PyObject *__pyx_n_s_Tellable___init; static PyObject *__pyx_n_s_Tellable_close; static PyObject *__pyx_n_s_Tellable_flush; static PyObject *__pyx_n_s_Tellable_tell; static PyObject *__pyx_n_s_Tellable_write; static PyObject *__pyx_kp_u_Test_if_a_zipfile_is_valid; static PyObject *__pyx_n_s_TextIOWrapper; static PyObject *__pyx_kp_u_That_compression_method_is_not_s; static PyObject *__pyx_kp_u_The_following_enclosed_file_is_c; static PyObject *__pyx_kp_u_There_is_no_item_named_r_in_the; static PyObject *__pyx_kp_u_Truncated_central_directory; static PyObject *__pyx_kp_u_Truncated_file_header; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_n_s_UnicodeDecodeError; static PyObject *__pyx_n_s_UnsupportedOperation; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_kp_u_Writing_not_supported; static PyObject *__pyx_n_s_ZIP64_LIMIT; static PyObject *__pyx_n_s_ZIP64_VERSION; static PyObject *__pyx_n_s_ZIP_BZIP2; static PyObject *__pyx_n_u_ZIP_BZIP2; static PyObject *__pyx_n_s_ZIP_DEFLATED; static PyObject *__pyx_n_u_ZIP_DEFLATED; static PyObject *__pyx_n_s_ZIP_FILECOUNT_LIMIT; static PyObject *__pyx_n_s_ZIP_LZMA; static PyObject *__pyx_n_u_ZIP_LZMA; static PyObject *__pyx_n_s_ZIP_MAX_COMMENT; static PyObject *__pyx_n_s_ZIP_STORED; static PyObject *__pyx_n_u_ZIP_STORED; static PyObject *__pyx_kp_u_ZIP_does_not_support_timestamps; static PyObject *__pyx_n_s_Z_DEFAULT_COMPRESSION; static PyObject *__pyx_n_s_ZipDecrypter; static PyObject *__pyx_n_s_ZipDecrypter_locals_crc32; static PyObject *__pyx_n_s_ZipDecrypter_locals_decrypter; static PyObject *__pyx_n_s_ZipDecrypter_locals_update_keys; static PyObject *__pyx_n_s_ZipExtFile; static PyObject *__pyx_n_s_ZipExtFile___init; static PyObject *__pyx_n_s_ZipExtFile___repr; static PyObject *__pyx_n_s_ZipExtFile__init_decrypter; static PyObject *__pyx_n_s_ZipExtFile__read1; static PyObject *__pyx_n_s_ZipExtFile__read2; static PyObject *__pyx_n_s_ZipExtFile__update_crc; static PyObject *__pyx_n_s_ZipExtFile_close; static PyObject *__pyx_n_s_ZipExtFile_peek; static PyObject *__pyx_n_s_ZipExtFile_read; static PyObject *__pyx_n_s_ZipExtFile_read1; static PyObject *__pyx_n_s_ZipExtFile_readable; static PyObject *__pyx_n_s_ZipExtFile_readline; static PyObject *__pyx_n_s_ZipExtFile_seek; static PyObject *__pyx_n_s_ZipExtFile_seekable; static PyObject *__pyx_n_s_ZipExtFile_tell; static PyObject *__pyx_n_s_ZipFile; static PyObject *__pyx_n_u_ZipFile; static PyObject *__pyx_n_s_ZipFile__RealGetContents; static PyObject *__pyx_n_s_ZipFile___del; static PyObject *__pyx_n_s_ZipFile___enter; static PyObject *__pyx_n_s_ZipFile___exit; static PyObject *__pyx_n_s_ZipFile___init; static PyObject *__pyx_n_s_ZipFile___repr; static PyObject *__pyx_n_s_ZipFile__extract_member; static PyObject *__pyx_n_s_ZipFile__extract_member_locals_g; static PyObject *__pyx_n_s_ZipFile__fpclose; static PyObject *__pyx_kp_u_ZipFile_can_only_read; static PyObject *__pyx_n_s_ZipFile_close; static PyObject *__pyx_n_s_ZipFile_comment; static PyObject *__pyx_n_s_ZipFile_extract; static PyObject *__pyx_n_s_ZipFile_extractall; static PyObject *__pyx_n_s_ZipFile_getinfo; static PyObject *__pyx_n_s_ZipFile_infolist; static PyObject *__pyx_n_s_ZipFile_namelist; static PyObject *__pyx_n_s_ZipFile_open; static PyObject *__pyx_n_s_ZipFile_printdir; static PyObject *__pyx_n_s_ZipFile_read; static PyObject *__pyx_n_s_ZipFile_setpassword; static PyObject *__pyx_kp_s_ZipFile_subclass_to_ensure_impl; static PyObject *__pyx_n_s_ZipFile_testzip; static PyObject *__pyx_n_s_ZipInfo; static PyObject *__pyx_n_u_ZipInfo; static PyObject *__pyx_n_s_ZipInfo___init; static PyObject *__pyx_n_s_ZipInfo___repr; static PyObject *__pyx_n_s_ZipInfo__decodeExtra; static PyObject *__pyx_n_s_ZipInfo_is_dir; static PyObject *__pyx_kp_u__10; static PyObject *__pyx_kp_u__11; static PyObject *__pyx_kp_u__13; static PyObject *__pyx_kp_u__28; static PyObject *__pyx_kp_u__29; static PyObject *__pyx_kp_b__30; static PyObject *__pyx_kp_u__39; static PyObject *__pyx_kp_b__6; static PyObject *__pyx_kp_u__8; static PyObject *__pyx_n_u_a; static PyObject *__pyx_n_s_add; static PyObject *__pyx_n_s_add_argument; static PyObject *__pyx_n_s_add_mutually_exclusive_group; static PyObject *__pyx_n_s_all; static PyObject *__pyx_n_s_allowZip64; static PyObject *__pyx_n_s_allowZip64_2; static PyObject *__pyx_n_s_altsep; static PyObject *__pyx_n_s_ancestry; static PyObject *__pyx_kp_u_ancestry_line_1473; static PyObject *__pyx_kp_u_and_header; static PyObject *__pyx_n_s_append; static PyObject *__pyx_n_s_arcname; static PyObject *__pyx_n_s_argparse; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_as_dirs; static PyObject *__pyx_n_s_at; static PyObject *__pyx_n_u_b; static PyObject *__pyx_n_s_badfile; static PyObject *__pyx_n_s_basename; static PyObject *__pyx_n_s_binascii; static PyObject *__pyx_n_s_buf; static PyObject *__pyx_n_s_buff_offset; static PyObject *__pyx_n_s_buffer; static PyObject *__pyx_n_s_bz2; static PyObject *__pyx_n_u_bzip2; static PyObject *__pyx_n_s_c; static PyObject *__pyx_n_s_calcsize; static PyObject *__pyx_n_s_centdir; static PyObject *__pyx_n_s_ch; static PyObject *__pyx_n_s_chain; static PyObject *__pyx_n_s_check_byte; static PyObject *__pyx_n_s_check_compression; static PyObject *__pyx_n_s_check_zipfile; static PyObject *__pyx_n_s_chunk; static PyObject *__pyx_n_s_chunk_size; static PyObject *__pyx_n_s_class; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_close; static PyObject *__pyx_n_s_close_2; static PyObject *__pyx_n_s_close_fileobj; static PyObject *__pyx_n_s_close_fileobj_2; static PyObject *__pyx_n_s_closed; static PyObject *__pyx_kp_u_closed_2; static PyObject *__pyx_n_s_cls; static PyObject *__pyx_n_s_comment; static PyObject *__pyx_n_u_comment; static PyObject *__pyx_n_s_commentSize; static PyObject *__pyx_n_s_comment_2; static PyObject *__pyx_kp_u_comment_expected_bytes_got_s; static PyObject *__pyx_n_s_comp; static PyObject *__pyx_n_s_compress; static PyObject *__pyx_n_s_compress_left; static PyObject *__pyx_n_s_compress_size; static PyObject *__pyx_n_u_compress_size; static PyObject *__pyx_kp_u_compress_size_r; static PyObject *__pyx_n_s_compress_type; static PyObject *__pyx_n_u_compress_type; static PyObject *__pyx_n_s_compress_type_2; static PyObject *__pyx_kp_u_compress_type_s; static PyObject *__pyx_kp_u_compressed_patched_data_flag_bit; static PyObject *__pyx_n_s_compression; static PyObject *__pyx_kp_u_compression_type; static PyObject *__pyx_n_s_compresslevel; static PyObject *__pyx_n_u_compresslevel; static PyObject *__pyx_n_s_compresslevel_2; static PyObject *__pyx_n_s_compressobj; static PyObject *__pyx_n_s_compressor_names; static PyObject *__pyx_n_s_concat; static PyObject *__pyx_n_s_contains; static PyObject *__pyx_n_s_contextlib; static PyObject *__pyx_n_s_copyfileobj; static PyObject *__pyx_n_s_crc; static PyObject *__pyx_n_s_crc32; static PyObject *__pyx_n_s_crctable; static PyObject *__pyx_n_s_crctable_2; static PyObject *__pyx_n_s_create_system; static PyObject *__pyx_n_u_create_system; static PyObject *__pyx_n_s_create_version; static PyObject *__pyx_n_u_create_version; static PyObject *__pyx_n_s_curdir; static PyObject *__pyx_n_s_curr_pos; static PyObject *__pyx_n_s_d; static PyObject *__pyx_n_u_d; static PyObject *__pyx_kp_u_d_02d_02d_02d_02d_02d; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_date; static PyObject *__pyx_n_s_date_time; static PyObject *__pyx_n_u_date_time; static PyObject *__pyx_n_s_debug; static PyObject *__pyx_n_s_decode; static PyObject *__pyx_n_s_decodeExtra; static PyObject *__pyx_n_s_decode_filter_properties; static PyObject *__pyx_n_s_decomp; static PyObject *__pyx_n_s_decompress; static PyObject *__pyx_n_s_decompressobj; static PyObject *__pyx_n_s_decompressor; static PyObject *__pyx_n_s_decrypter; static PyObject *__pyx_n_s_decrypter_2; static PyObject *__pyx_n_s_dedupe; static PyObject *__pyx_n_u_deflate; static PyObject *__pyx_n_u_deflate64; static PyObject *__pyx_n_s_del; static PyObject *__pyx_n_s_descr; static PyObject *__pyx_n_s_description; static PyObject *__pyx_n_s_didModify; static PyObject *__pyx_kp_u_differ; static PyObject *__pyx_n_s_difference; static PyObject *__pyx_n_s_dir_match; static PyObject *__pyx_n_s_dircount; static PyObject *__pyx_n_s_dircount2; static PyObject *__pyx_n_s_dirname; static PyObject *__pyx_n_s_diroffset; static PyObject *__pyx_n_s_dirsize; static PyObject *__pyx_n_s_disk_dir; static PyObject *__pyx_n_s_disk_num; static PyObject *__pyx_n_s_diskno; static PyObject *__pyx_n_s_disks; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_kp_u_e; static PyObject *__pyx_n_s_encode_filter_properties; static PyObject *__pyx_kp_u_encoding_args_invalid_for_binary; static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_endrec; static PyObject *__pyx_n_s_endswith; static PyObject *__pyx_n_s_enter; static PyObject *__pyx_n_s_eof; static PyObject *__pyx_n_s_eof_2; static PyObject *__pyx_n_s_error; static PyObject *__pyx_n_u_error; static PyObject *__pyx_n_s_exists; static PyObject *__pyx_n_s_exit; static PyObject *__pyx_n_s_expected_crc; static PyObject *__pyx_n_s_external_attr; static PyObject *__pyx_n_u_external_attr; static PyObject *__pyx_kp_u_external_attr_x; static PyObject *__pyx_n_s_extra; static PyObject *__pyx_n_u_extra; static PyObject *__pyx_kp_u_extract; static PyObject *__pyx_n_s_extract_2; static PyObject *__pyx_n_s_extract_member; static PyObject *__pyx_n_s_extract_version; static PyObject *__pyx_n_u_extract_version; static PyObject *__pyx_n_s_extractall; static PyObject *__pyx_n_s_f; static PyObject *__pyx_n_s_fheader; static PyObject *__pyx_n_s_field; static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_filePassed; static PyObject *__pyx_n_s_fileRefCnt; static PyObject *__pyx_n_s_file_2; static PyObject *__pyx_kp_u_file_r; static PyObject *__pyx_n_s_file_size; static PyObject *__pyx_n_u_file_size; static PyObject *__pyx_kp_u_file_size_r; static PyObject *__pyx_n_s_filelist; static PyObject *__pyx_n_s_filemode; static PyObject *__pyx_kp_u_filemode_r; static PyObject *__pyx_n_s_filename; static PyObject *__pyx_n_u_filename; static PyObject *__pyx_kp_u_filename_2; static PyObject *__pyx_kp_u_filename_r; static PyObject *__pyx_n_s_fileobj; static PyObject *__pyx_n_s_fileobj_2; static PyObject *__pyx_n_s_filepos; static PyObject *__pyx_n_s_filesize; static PyObject *__pyx_n_s_filter; static PyObject *__pyx_n_s_filterfalse; static PyObject *__pyx_n_s_filters; static PyObject *__pyx_n_s_find; static PyObject *__pyx_n_s_flag_bits; static PyObject *__pyx_n_u_flag_bits; static PyObject *__pyx_n_s_flags; static PyObject *__pyx_n_s_flush; static PyObject *__pyx_n_s_fname; static PyObject *__pyx_n_s_fname_str; static PyObject *__pyx_n_s_force_zip64; static PyObject *__pyx_n_s_format; static PyObject *__pyx_n_s_fp; static PyObject *__pyx_n_s_fpclose; static PyObject *__pyx_n_s_fpin; static PyObject *__pyx_n_s_from_iterable; static PyObject *__pyx_n_s_fromkeys; static PyObject *__pyx_n_s_fspath; static PyObject *__pyx_n_s_gen_crc; static PyObject *__pyx_n_s_genexpr; static PyObject *__pyx_n_s_get; static PyObject *__pyx_n_s_get_compressor; static PyObject *__pyx_n_s_get_decompressor; static PyObject *__pyx_n_s_getcwd; static PyObject *__pyx_n_s_getinfo; static PyObject *__pyx_kp_u_given_inferred_offset; static PyObject *__pyx_n_s_group; static PyObject *__pyx_n_s_h; static PyObject *__pyx_n_s_header; static PyObject *__pyx_n_s_header_offset; static PyObject *__pyx_n_u_header_offset; static PyObject *__pyx_n_s_help; static PyObject *__pyx_n_s_hi; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_u_id; static PyObject *__pyx_n_s_implied_dirs; static PyObject *__pyx_n_u_implode; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_importlib; static PyObject *__pyx_n_s_importlib_util; static PyObject *__pyx_n_s_inferred; static PyObject *__pyx_n_s_info; static PyObject *__pyx_n_s_infolist; static PyObject *__pyx_n_s_init; static PyObject *__pyx_n_s_init_2; static PyObject *__pyx_n_s_init_decrypter; static PyObject *__pyx_n_s_internal_attr; static PyObject *__pyx_n_u_internal_attr; static PyObject *__pyx_n_s_invalid_path_parts; static PyObject *__pyx_n_s_io; static PyObject *__pyx_n_s_is_child; static PyObject *__pyx_n_s_is_dir; static PyObject *__pyx_n_s_is_encrypted; static PyObject *__pyx_n_s_is_file; static PyObject *__pyx_n_s_is_zipfile; static PyObject *__pyx_n_u_is_zipfile; static PyObject *__pyx_n_s_isdir; static PyObject *__pyx_n_s_islice; static PyObject *__pyx_n_s_iterdir; static PyObject *__pyx_n_s_itertools; static PyObject *__pyx_n_s_j; static PyObject *__pyx_n_s_join; static PyObject *__pyx_n_s_joinpath; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_key0; static PyObject *__pyx_n_s_key1; static PyObject *__pyx_n_s_key2; static PyObject *__pyx_n_s_kwargs; static PyObject *__pyx_kp_u_l; static PyObject *__pyx_n_s_left; static PyObject *__pyx_n_s_limit; static PyObject *__pyx_n_s_line; static PyObject *__pyx_kp_u_list; static PyObject *__pyx_n_s_list_2; static PyObject *__pyx_n_s_ln; static PyObject *__pyx_n_s_lo; static PyObject *__pyx_n_s_lock; static PyObject *__pyx_n_s_lock_2; static PyObject *__pyx_n_u_lz77; static PyObject *__pyx_n_s_lzma; static PyObject *__pyx_n_u_lzma; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_u_main; static PyObject *__pyx_n_s_main_2; static PyObject *__pyx_n_s_make; static PyObject *__pyx_n_s_makedirs; static PyObject *__pyx_n_s_map; static PyObject *__pyx_n_s_maxCommentStart; static PyObject *__pyx_n_s_member; static PyObject *__pyx_n_s_members; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_metavar; static PyObject *__pyx_n_s_minuend; static PyObject *__pyx_n_s_mkdir; static PyObject *__pyx_n_s_mode; static PyObject *__pyx_n_s_modeDict; static PyObject *__pyx_n_s_modified; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_n_u_name_2; static PyObject *__pyx_kp_u_name_r; static PyObject *__pyx_n_s_name_set; static PyObject *__pyx_n_s_namelist; static PyObject *__pyx_n_s_names; static PyObject *__pyx_n_s_nargs; static PyObject *__pyx_n_s_new; static PyObject *__pyx_n_s_new_pos; static PyObject *__pyx_n_s_newdata; static PyObject *__pyx_n_s_newlines; static PyObject *__pyx_n_s_next; static PyObject *__pyx_n_s_next_2; static PyObject *__pyx_n_s_normpath; static PyObject *__pyx_kp_u_not_found; static PyObject *__pyx_n_s_null_byte; static PyObject *__pyx_n_s_object; static PyObject *__pyx_n_s_offset; static PyObject *__pyx_n_s_offset_2; static PyObject *__pyx_n_s_offset_cd; static PyObject *__pyx_n_s_open; static PyObject *__pyx_n_s_orig_compress_size; static PyObject *__pyx_n_s_orig_compress_start; static PyObject *__pyx_n_s_orig_file_size; static PyObject *__pyx_n_s_orig_filename; static PyObject *__pyx_n_u_orig_filename; static PyObject *__pyx_n_s_orig_start_crc; static PyObject *__pyx_n_s_os; static PyObject *__pyx_kp_u_output_dir; static PyObject *__pyx_n_s_p; static PyObject *__pyx_n_s_pack; static PyObject *__pyx_n_s_pardir; static PyObject *__pyx_n_s_parent; static PyObject *__pyx_n_s_parent_at; static PyObject *__pyx_n_s_parents; static PyObject *__pyx_n_s_parents_2; static PyObject *__pyx_kp_u_parents_line_1455; static PyObject *__pyx_n_s_parse_args; static PyObject *__pyx_n_s_parser; static PyObject *__pyx_n_s_path; static PyObject *__pyx_n_s_peek; static PyObject *__pyx_n_s_platform; static PyObject *__pyx_n_s_pop; static PyObject *__pyx_n_s_pos; static PyObject *__pyx_n_s_pos_2; static PyObject *__pyx_n_s_posixpath; static PyObject *__pyx_n_u_ppmd; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_print; static PyObject *__pyx_n_s_printdir; static PyObject *__pyx_n_s_property; static PyObject *__pyx_n_s_props; static PyObject *__pyx_n_s_psize; static PyObject *__pyx_n_s_pwd; static PyObject *__pyx_n_u_pwd; static PyObject *__pyx_n_s_pwd_2; static PyObject *__pyx_kp_u_pwd_expected_bytes_got_s; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_u_r; static PyObject *__pyx_kp_u_r_b; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_raw_time; static PyObject *__pyx_n_u_raw_time; static PyObject *__pyx_n_u_rb; static PyObject *__pyx_n_s_read; static PyObject *__pyx_n_u_read; static PyObject *__pyx_n_s_read1; static PyObject *__pyx_n_s_read1_2; static PyObject *__pyx_n_s_read2; static PyObject *__pyx_n_s_read_bytes; static PyObject *__pyx_kp_u_read_from_closed_file; static PyObject *__pyx_n_s_read_len; static PyObject *__pyx_n_s_read_offset; static PyObject *__pyx_n_s_read_text; static PyObject *__pyx_n_s_read_version; static PyObject *__pyx_n_s_readable; static PyObject *__pyx_n_s_readbuffer; static PyObject *__pyx_n_s_readline; static PyObject *__pyx_n_s_recData; static PyObject *__pyx_n_u_reduce; static PyObject *__pyx_n_s_reloff; static PyObject *__pyx_n_s_replace; static PyObject *__pyx_n_s_repr; static PyObject *__pyx_n_s_required; static PyObject *__pyx_n_s_res; static PyObject *__pyx_n_s_reserved; static PyObject *__pyx_n_u_reserved; static PyObject *__pyx_n_s_resolve_dir; static PyObject *__pyx_n_s_result; static PyObject *__pyx_n_s_rfind; static PyObject *__pyx_n_s_root; static PyObject *__pyx_n_s_rstrip; static PyObject *__pyx_n_s_running_crc; static PyObject *__pyx_n_s_seek; static PyObject *__pyx_kp_u_seek_on_closed_file; static PyObject *__pyx_n_s_seekable; static PyObject *__pyx_n_s_seekable_2; static PyObject *__pyx_n_s_self; static PyObject *__pyx_kp_u_self___class_____name___self_ro; static PyObject *__pyx_n_s_send; static PyObject *__pyx_n_s_sep; static PyObject *__pyx_n_s_setpassword; static PyObject *__pyx_n_s_setter; static PyObject *__pyx_n_u_shrink; static PyObject *__pyx_n_s_shutil; static PyObject *__pyx_n_s_sig; static PyObject *__pyx_kp_u_size; static PyObject *__pyx_n_s_sizeCentralDir; static PyObject *__pyx_n_s_sizeEndCentDir; static PyObject *__pyx_n_s_sizeEndCentDir64; static PyObject *__pyx_n_s_sizeEndCentDir64Locator; static PyObject *__pyx_n_s_sizeFileHeader; static PyObject *__pyx_n_s_size_cd; static PyObject *__pyx_n_s_slots; static PyObject *__pyx_n_s_source; static PyObject *__pyx_n_s_split; static PyObject *__pyx_n_s_splitdrive; static PyObject *__pyx_n_s_src; static PyObject *__pyx_n_s_stacklevel; static PyObject *__pyx_n_s_start; static PyObject *__pyx_n_s_start_dir; static PyObject *__pyx_n_s_stat; static PyObject *__pyx_n_s_staticmethod; static PyObject *__pyx_n_u_store; static PyObject *__pyx_n_s_str; static PyObject *__pyx_n_s_stream; static PyObject *__pyx_n_s_strict_timestamps; static PyObject *__pyx_n_s_strict_timestamps_2; static PyObject *__pyx_n_s_stringCentralDir; static PyObject *__pyx_n_s_stringEndArchive; static PyObject *__pyx_n_s_stringEndArchive64; static PyObject *__pyx_n_s_stringEndArchive64Locator; static PyObject *__pyx_n_s_stringFileHeader; static PyObject *__pyx_n_s_strip_extra; static PyObject *__pyx_n_s_strm; static PyObject *__pyx_kp_u_strong_encryption_flag_bit_6; static PyObject *__pyx_n_s_struct; static PyObject *__pyx_n_s_structCentralDir; static PyObject *__pyx_n_s_structEndArchive; static PyObject *__pyx_n_s_structEndArchive64; static PyObject *__pyx_n_s_structEndArchive64Locator; static PyObject *__pyx_n_s_structFileHeader; static PyObject *__pyx_n_s_subs; static PyObject *__pyx_n_s_subtrahend; static PyObject *__pyx_n_s_super; static PyObject *__pyx_n_s_suppress; static PyObject *__pyx_n_s_sys; static PyObject *__pyx_n_s_sz; static PyObject *__pyx_kp_u_t; static PyObject *__pyx_n_s_t_2; static PyObject *__pyx_n_s_tail; static PyObject *__pyx_n_s_target; static PyObject *__pyx_n_s_targetpath; static PyObject *__pyx_n_s_tell; static PyObject *__pyx_kp_u_tell_on_closed_file; static PyObject *__pyx_n_u_terse; static PyObject *__pyx_kp_u_test; static PyObject *__pyx_n_s_test_2; static PyObject *__pyx_n_s_test_3; static PyObject *__pyx_n_s_testzip; static PyObject *__pyx_n_s_threading; static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_s_time; static PyObject *__pyx_n_u_tokenize; static PyObject *__pyx_n_s_total; static PyObject *__pyx_n_u_total; static PyObject *__pyx_n_s_tp; static PyObject *__pyx_n_s_traceback; static PyObject *__pyx_n_s_truediv; static PyObject *__pyx_n_s_turbozipfile; static PyObject *__pyx_kp_s_turbozipfile_py; static PyObject *__pyx_n_s_type; static PyObject *__pyx_n_s_unconsumed; static PyObject *__pyx_n_s_unconsumed_tail; static PyObject *__pyx_kp_u_underlying_stream_is_not_seekabl; static PyObject *__pyx_n_s_unpack; static PyObject *__pyx_n_s_update; static PyObject *__pyx_n_s_update_crc; static PyObject *__pyx_n_s_update_keys; static PyObject *__pyx_n_s_upperdirs; static PyObject *__pyx_kp_u_utf_8; static PyObject *__pyx_n_s_value; static PyObject *__pyx_n_s_vars; static PyObject *__pyx_n_s_volume; static PyObject *__pyx_n_u_volume; static PyObject *__pyx_n_u_w; static PyObject *__pyx_kp_u_w_b; static PyObject *__pyx_n_s_warn; static PyObject *__pyx_n_s_warnings; static PyObject *__pyx_n_u_wavpack; static PyObject *__pyx_n_u_wb; static PyObject *__pyx_n_s_whence; static PyObject *__pyx_kp_u_whence_must_be_os_SEEK_SET_0_os; static PyObject *__pyx_n_u_win32; static PyObject *__pyx_n_s_windows_illegal_name_trans_tabl; static PyObject *__pyx_n_s_write; static PyObject *__pyx_n_s_x; static PyObject *__pyx_n_u_x; static PyObject *__pyx_kp_u_x_b; static PyObject *__pyx_n_u_xb; static PyObject *__pyx_n_s_xid; static PyObject *__pyx_n_s_xids; static PyObject *__pyx_n_s_xlen; static PyObject *__pyx_n_s_zef_file; static PyObject *__pyx_n_s_zf; static PyObject *__pyx_n_s_zinfo; static PyObject *__pyx_kp_u_zip_file_version_1f; static PyObject *__pyx_n_s_zip_mode; static PyObject *__pyx_kp_u_zipfile; static PyObject *__pyx_kp_u_zipfiles_that_span_multiple_disk; static PyObject *__pyx_n_s_zipinfo; static PyObject *__pyx_n_s_zlib; static PyObject *__pyx_pf_12turbozipfile__strip_extra(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extra, PyObject *__pyx_v_xids); static PyObject *__pyx_pf_12turbozipfile_2_check_zipfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fp); static PyObject *__pyx_pf_12turbozipfile_4is_zipfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename); static PyObject *__pyx_pf_12turbozipfile_6_EndRecData64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fpin, PyObject *__pyx_v_offset, PyObject *__pyx_v_endrec); static PyObject *__pyx_pf_12turbozipfile_8_EndRecData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fpin); static PyObject *__pyx_pf_12turbozipfile_7ZipInfo___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_orig_filename, PyObject *__pyx_v_date_time); static PyObject *__pyx_pf_12turbozipfile_7ZipInfo_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipInfo_4_decodeExtra(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipInfo_6is_dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_10_gen_crc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_crc); static PyObject *__pyx_pf_12turbozipfile_13_ZipDecrypter_crc32(PyObject *__pyx_self, PyObject *__pyx_v_ch, PyObject *__pyx_v_crc); static PyObject *__pyx_pf_12turbozipfile_13_ZipDecrypter_2update_keys(PyObject *__pyx_self, PyObject *__pyx_v_c); static PyObject *__pyx_pf_12turbozipfile_13_ZipDecrypter_4decrypter(PyObject *__pyx_self, PyObject *__pyx_v_data); static PyObject *__pyx_pf_12turbozipfile_12_ZipDecrypter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pwd); static PyObject *__pyx_pf_12turbozipfile_14LZMACompressor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_14LZMACompressor_2_init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_14LZMACompressor_4compress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); static PyObject *__pyx_pf_12turbozipfile_14LZMACompressor_6flush(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_16LZMADecompressor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_16LZMADecompressor_2decompress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); static PyObject *__pyx_pf_12turbozipfile_14_check_compression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_compression); static PyObject *__pyx_pf_12turbozipfile_16_get_compressor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_compress_type, PyObject *__pyx_v_compresslevel); static PyObject *__pyx_pf_12turbozipfile_18_get_decompressor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_compress_type); static PyObject *__pyx_pf_12turbozipfile_11_SharedFile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_pos, PyObject *__pyx_v_close, PyObject *__pyx_v_lock); static PyObject *__pyx_pf_12turbozipfile_11_SharedFile_2seek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_whence); static PyObject *__pyx_pf_12turbozipfile_11_SharedFile_4read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); static PyObject *__pyx_pf_12turbozipfile_11_SharedFile_6close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_9_Tellable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fp); static PyObject *__pyx_pf_12turbozipfile_9_Tellable_2write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); static PyObject *__pyx_pf_12turbozipfile_9_Tellable_4tell(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_9_Tellable_6flush(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_9_Tellable_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fileobj, CYTHON_UNUSED PyObject *__pyx_v_mode, PyObject *__pyx_v_zipinfo, PyObject *__pyx_v_pwd, PyObject *__pyx_v_close_fileobj); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_2_init_decrypter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_6readline(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_limit); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_8peek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_10readable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_12read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_14_update_crc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_newdata); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_16read1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_18_read1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_20_read2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_22close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_24seekable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_26seek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_whence); static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_28tell(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_29__defaults__(CYTHON_UNUSED PyObject *__pyx_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_mode, PyObject *__pyx_v_compression, PyObject *__pyx_v_allowZip64, PyObject *__pyx_v_compresslevel, PyObject *__pyx_v_strict_timestamps); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_2__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_4__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_8_RealGetContents(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_10namelist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_12infolist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_14printdir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_16testzip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_18getinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_20setpassword(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pwd); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_22comment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_24comment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_comment); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_26read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_pwd); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_28open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_mode, PyObject *__pyx_v_pwd, CYTHON_UNUSED PyObject *__pyx_v_force_zip64); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_30extract(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_member, PyObject *__pyx_v_path, PyObject *__pyx_v_pwd); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_32extractall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_members, PyObject *__pyx_v_pwd); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_15_extract_member_genexpr(PyObject *__pyx_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_34_extract_member(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_member, PyObject *__pyx_v_targetpath, PyObject *__pyx_v_pwd); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_36__del__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_38close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_40_fpclose(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fp); static PyObject *__pyx_pf_12turbozipfile_20_parents(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); static PyObject *__pyx_pf_12turbozipfile_22_ancestry(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); static PyObject *__pyx_pf_12turbozipfile_25_difference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_minuend, PyObject *__pyx_v_subtrahend); static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs_13_implied_dirs_genexpr(PyObject *__pyx_self); static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs__implied_dirs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_names); static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs_2namelist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs_4_name_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs_6resolve_dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs_8make(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_source); static PyObject *__pyx_pf_12turbozipfile_10FastLookup_namelist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_10FastLookup_2_name_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_4Path___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_root, PyObject *__pyx_v_at); static PyObject *__pyx_pf_12turbozipfile_4Path_2open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); static PyObject *__pyx_pf_12turbozipfile_4Path_4name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_4Path_6read_text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); static PyObject *__pyx_pf_12turbozipfile_4Path_8read_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_4Path_10_is_child(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_path); static PyObject *__pyx_pf_12turbozipfile_4Path_12_next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_at); static PyObject *__pyx_pf_12turbozipfile_4Path_14is_dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_4Path_16is_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_4Path_18exists(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_4Path_20iterdir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_4Path_22__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_4Path_24__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_4Path_26joinpath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_add); static PyObject *__pyx_pf_12turbozipfile_4Path_28parent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); static PyObject *__pyx_pf_12turbozipfile_27main(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct___ZipDecrypter(PyTypeObject *t, PyObject *a, PyObject *k); static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct_1__extract_member(PyTypeObject *t, PyObject *a, PyObject *k); static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct_3__ancestry(PyTypeObject *t, PyObject *a, PyObject *k); static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct_4__implied_dirs(PyTypeObject *t, PyObject *a, PyObject *k); static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop = {0, &__pyx_n_s_pop, 0, 0, 0}; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_3; static PyObject *__pyx_int_4; static PyObject *__pyx_int_5; static PyObject *__pyx_int_6; static PyObject *__pyx_int_7; static PyObject *__pyx_int_8; static PyObject *__pyx_int_9; static PyObject *__pyx_int_10; static PyObject *__pyx_int_11; static PyObject *__pyx_int_12; static PyObject *__pyx_int_13; static PyObject *__pyx_int_14; static PyObject *__pyx_int_15; static PyObject *__pyx_int_16; static PyObject *__pyx_int_17; static PyObject *__pyx_int_18; static PyObject *__pyx_int_19; static PyObject *__pyx_int_20; static PyObject *__pyx_int_24; static PyObject *__pyx_int_31; static PyObject *__pyx_int_32; static PyObject *__pyx_int_45; static PyObject *__pyx_int_46; static PyObject *__pyx_int_63; static PyObject *__pyx_int_64; static PyObject *__pyx_int_97; static PyObject *__pyx_int_98; static PyObject *__pyx_int_255; static PyObject *__pyx_int_256; static PyObject *__pyx_int_512; static PyObject *__pyx_int_1980; static PyObject *__pyx_int_4096; static PyObject *__pyx_int_65535; static PyObject *__pyx_int_65536; static PyObject *__pyx_int_16777216; static PyObject *__pyx_int_134695760; static PyObject *__pyx_int_134775813; static PyObject *__pyx_int_305419896; static PyObject *__pyx_int_591751049; static PyObject *__pyx_int_878082192; static PyObject *__pyx_int_1073741824; static PyObject *__pyx_int_2147483647; static PyObject *__pyx_int_3988292384; static PyObject *__pyx_int_4294967295; static PyObject *__pyx_int_18446744073709551615; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_neg_2; static PyObject *__pyx_int_neg_15; static PyObject *__pyx_slice__4; static PyObject *__pyx_slice__5; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__9; static PyObject *__pyx_slice__12; static PyObject *__pyx_slice__14; static PyObject *__pyx_slice__15; static PyObject *__pyx_slice__23; static PyObject *__pyx_slice__37; static PyObject *__pyx_slice__38; static PyObject *__pyx_slice__40; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__21; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__25; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__27; static PyObject *__pyx_tuple__31; static PyObject *__pyx_tuple__32; static PyObject *__pyx_tuple__33; static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__35; static PyObject *__pyx_tuple__36; static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__42; static PyObject *__pyx_tuple__43; static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__46; static PyObject *__pyx_tuple__47; 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__57; static PyObject *__pyx_tuple__59; static PyObject *__pyx_tuple__61; static PyObject *__pyx_tuple__63; static PyObject *__pyx_tuple__65; static PyObject *__pyx_tuple__66; static PyObject *__pyx_tuple__67; static PyObject *__pyx_tuple__69; static PyObject *__pyx_tuple__70; static PyObject *__pyx_tuple__72; static PyObject *__pyx_tuple__74; static PyObject *__pyx_tuple__76; static PyObject *__pyx_tuple__78; static PyObject *__pyx_tuple__80; static PyObject *__pyx_tuple__82; static PyObject *__pyx_tuple__84; static PyObject *__pyx_tuple__86; static PyObject *__pyx_tuple__88; static PyObject *__pyx_tuple__90; static PyObject *__pyx_tuple__92; static PyObject *__pyx_tuple__94; static PyObject *__pyx_tuple__96; static PyObject *__pyx_tuple__97; static PyObject *__pyx_tuple__99; static PyObject *__pyx_tuple__101; static PyObject *__pyx_tuple__103; static PyObject *__pyx_tuple__104; static PyObject *__pyx_tuple__106; static PyObject *__pyx_tuple__107; static PyObject *__pyx_tuple__109; static PyObject *__pyx_tuple__111; static PyObject *__pyx_tuple__113; static PyObject *__pyx_tuple__115; static PyObject *__pyx_tuple__117; static PyObject *__pyx_tuple__119; static PyObject *__pyx_tuple__121; static PyObject *__pyx_tuple__122; static PyObject *__pyx_tuple__124; static PyObject *__pyx_tuple__126; static PyObject *__pyx_tuple__128; static PyObject *__pyx_tuple__129; static PyObject *__pyx_tuple__131; static PyObject *__pyx_tuple__132; static PyObject *__pyx_tuple__134; static PyObject *__pyx_tuple__136; static PyObject *__pyx_tuple__137; static PyObject *__pyx_tuple__139; static PyObject *__pyx_tuple__141; static PyObject *__pyx_tuple__143; static PyObject *__pyx_tuple__145; static PyObject *__pyx_tuple__147; static PyObject *__pyx_tuple__149; static PyObject *__pyx_tuple__151; static PyObject *__pyx_tuple__152; static PyObject *__pyx_tuple__154; static PyObject *__pyx_tuple__156; static PyObject *__pyx_tuple__158; static PyObject *__pyx_tuple__160; static PyObject *__pyx_tuple__162; static PyObject *__pyx_tuple__164; static PyObject *__pyx_tuple__166; static PyObject *__pyx_tuple__168; static PyObject *__pyx_tuple__170; static PyObject *__pyx_tuple__171; static PyObject *__pyx_tuple__173; static PyObject *__pyx_tuple__175; static PyObject *__pyx_tuple__177; static PyObject *__pyx_tuple__179; static PyObject *__pyx_tuple__181; static PyObject *__pyx_tuple__183; static PyObject *__pyx_tuple__184; static PyObject *__pyx_tuple__186; static PyObject *__pyx_tuple__187; static PyObject *__pyx_tuple__189; static PyObject *__pyx_tuple__190; static PyObject *__pyx_tuple__192; static PyObject *__pyx_tuple__193; static PyObject *__pyx_tuple__195; static PyObject *__pyx_tuple__197; static PyObject *__pyx_tuple__199; static PyObject *__pyx_tuple__201; static PyObject *__pyx_tuple__203; static PyObject *__pyx_tuple__204; static PyObject *__pyx_tuple__206; static PyObject *__pyx_tuple__208; static PyObject *__pyx_tuple__210; static PyObject *__pyx_tuple__212; static PyObject *__pyx_tuple__214; static PyObject *__pyx_tuple__216; static PyObject *__pyx_tuple__218; static PyObject *__pyx_tuple__220; static PyObject *__pyx_tuple__222; static PyObject *__pyx_tuple__223; static PyObject *__pyx_tuple__225; static PyObject *__pyx_tuple__226; static PyObject *__pyx_tuple__228; static PyObject *__pyx_tuple__230; static PyObject *__pyx_tuple__232; static PyObject *__pyx_tuple__234; static PyObject *__pyx_tuple__236; static PyObject *__pyx_tuple__238; static PyObject *__pyx_tuple__240; static PyObject *__pyx_tuple__242; static PyObject *__pyx_tuple__244; static PyObject *__pyx_tuple__246; static PyObject *__pyx_tuple__248; static PyObject *__pyx_tuple__250; static PyObject *__pyx_tuple__252; static PyObject *__pyx_tuple__254; static PyObject *__pyx_codeobj__18; static PyObject *__pyx_codeobj__20; static PyObject *__pyx_codeobj__22; static PyObject *__pyx_codeobj__45; static PyObject *__pyx_codeobj__56; static PyObject *__pyx_codeobj__58; static PyObject *__pyx_codeobj__60; static PyObject *__pyx_codeobj__62; static PyObject *__pyx_codeobj__64; static PyObject *__pyx_codeobj__68; static PyObject *__pyx_codeobj__71; static PyObject *__pyx_codeobj__73; static PyObject *__pyx_codeobj__75; static PyObject *__pyx_codeobj__77; static PyObject *__pyx_codeobj__79; static PyObject *__pyx_codeobj__81; static PyObject *__pyx_codeobj__83; static PyObject *__pyx_codeobj__85; static PyObject *__pyx_codeobj__87; static PyObject *__pyx_codeobj__89; static PyObject *__pyx_codeobj__91; static PyObject *__pyx_codeobj__93; static PyObject *__pyx_codeobj__95; static PyObject *__pyx_codeobj__98; static PyObject *__pyx_codeobj__100; static PyObject *__pyx_codeobj__102; static PyObject *__pyx_codeobj__105; static PyObject *__pyx_codeobj__108; static PyObject *__pyx_codeobj__110; static PyObject *__pyx_codeobj__112; static PyObject *__pyx_codeobj__114; static PyObject *__pyx_codeobj__116; static PyObject *__pyx_codeobj__118; static PyObject *__pyx_codeobj__120; static PyObject *__pyx_codeobj__123; static PyObject *__pyx_codeobj__125; static PyObject *__pyx_codeobj__127; static PyObject *__pyx_codeobj__130; static PyObject *__pyx_codeobj__133; static PyObject *__pyx_codeobj__135; static PyObject *__pyx_codeobj__138; static PyObject *__pyx_codeobj__140; static PyObject *__pyx_codeobj__142; static PyObject *__pyx_codeobj__144; static PyObject *__pyx_codeobj__146; static PyObject *__pyx_codeobj__148; static PyObject *__pyx_codeobj__150; static PyObject *__pyx_codeobj__153; static PyObject *__pyx_codeobj__155; static PyObject *__pyx_codeobj__157; static PyObject *__pyx_codeobj__159; static PyObject *__pyx_codeobj__161; static PyObject *__pyx_codeobj__163; static PyObject *__pyx_codeobj__165; static PyObject *__pyx_codeobj__167; static PyObject *__pyx_codeobj__169; static PyObject *__pyx_codeobj__172; static PyObject *__pyx_codeobj__174; static PyObject *__pyx_codeobj__176; static PyObject *__pyx_codeobj__178; static PyObject *__pyx_codeobj__180; static PyObject *__pyx_codeobj__182; static PyObject *__pyx_codeobj__185; static PyObject *__pyx_codeobj__188; static PyObject *__pyx_codeobj__191; static PyObject *__pyx_codeobj__194; static PyObject *__pyx_codeobj__196; static PyObject *__pyx_codeobj__198; static PyObject *__pyx_codeobj__200; static PyObject *__pyx_codeobj__202; static PyObject *__pyx_codeobj__205; static PyObject *__pyx_codeobj__207; static PyObject *__pyx_codeobj__209; static PyObject *__pyx_codeobj__211; static PyObject *__pyx_codeobj__213; static PyObject *__pyx_codeobj__215; static PyObject *__pyx_codeobj__217; static PyObject *__pyx_codeobj__219; static PyObject *__pyx_codeobj__221; static PyObject *__pyx_codeobj__224; static PyObject *__pyx_codeobj__227; static PyObject *__pyx_codeobj__229; static PyObject *__pyx_codeobj__231; static PyObject *__pyx_codeobj__233; static PyObject *__pyx_codeobj__235; static PyObject *__pyx_codeobj__237; static PyObject *__pyx_codeobj__239; static PyObject *__pyx_codeobj__241; static PyObject *__pyx_codeobj__243; static PyObject *__pyx_codeobj__245; static PyObject *__pyx_codeobj__247; static PyObject *__pyx_codeobj__249; static PyObject *__pyx_codeobj__251; static PyObject *__pyx_codeobj__253; static PyObject *__pyx_pw_12turbozipfile_1_strip_extra(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_1_strip_extra = {"_strip_extra", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_1_strip_extra, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_1_strip_extra(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_extra = 0; PyObject *__pyx_v_xids = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_strip_extra (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_extra,&__pyx_n_s_xids,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_extra)) != 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_xids)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_strip_extra", 1, 2, 2, 1); __PYX_ERR(0, 169, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_strip_extra") < 0)) __PYX_ERR(0, 169, __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_extra = values[0]; __pyx_v_xids = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_strip_extra", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 169, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile._strip_extra", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile__strip_extra(__pyx_self, __pyx_v_extra, __pyx_v_xids); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile__strip_extra(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extra, PyObject *__pyx_v_xids) { PyObject *__pyx_v_unpack = NULL; int __pyx_v_modified; PyObject *__pyx_v_buffer = NULL; PyObject *__pyx_v_start = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_xid = NULL; PyObject *__pyx_v_xlen = NULL; PyObject *__pyx_v_j = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_strip_extra", 0); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EXTRA_FIELD_STRUCT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_unpack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_unpack = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_modified = 0; __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_buffer = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_int_0); __pyx_v_start = __pyx_int_0; __Pyx_INCREF(__pyx_int_0); __pyx_v_i = __pyx_int_0; while (1) { __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_4, 4, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Length(__pyx_v_extra); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 175, __pyx_L1_error) __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_5) break; __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_4, 4, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_extra, 0, 0, &__pyx_v_i, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_v_unpack); __pyx_t_1 = __pyx_v_unpack; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __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_4)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; 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(0, 176, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 176, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 176, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_xid, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_xlen, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_4, 4, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_v_xlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_xid, __pyx_v_xids, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 178, __pyx_L1_error) __pyx_t_8 = (__pyx_t_5 != 0); if (__pyx_t_8) { __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_v_start, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_8) { __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_extra, 0, 0, &__pyx_v_start, &__pyx_v_i, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_buffer, __pyx_t_2); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_INCREF(__pyx_v_j); __Pyx_DECREF_SET(__pyx_v_start, __pyx_v_j); __pyx_v_modified = 1; } __Pyx_INCREF(__pyx_v_j); __Pyx_DECREF_SET(__pyx_v_i, __pyx_v_j); } __pyx_t_8 = ((!(__pyx_v_modified != 0)) != 0); if (__pyx_t_8) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_extra); __pyx_r = __pyx_v_extra; goto __pyx_L0; } __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBytes_Join(__pyx_kp_b_, __pyx_v_buffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; 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_6); __Pyx_AddTraceback("turbozipfile._strip_extra", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_unpack); __Pyx_XDECREF(__pyx_v_buffer); __Pyx_XDECREF(__pyx_v_start); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_xid); __Pyx_XDECREF(__pyx_v_xlen); __Pyx_XDECREF(__pyx_v_j); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_3_check_zipfile(PyObject *__pyx_self, PyObject *__pyx_v_fp); static PyMethodDef __pyx_mdef_12turbozipfile_3_check_zipfile = {"_check_zipfile", (PyCFunction)__pyx_pw_12turbozipfile_3_check_zipfile, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_3_check_zipfile(PyObject *__pyx_self, PyObject *__pyx_v_fp) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_zipfile (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_2_check_zipfile(__pyx_self, ((PyObject *)__pyx_v_fp)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_2_check_zipfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fp) { 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; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_zipfile", 0); { __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); { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_EndRecData); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 191, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __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_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_fp) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_fp); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 191, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L7_try_return; } } __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:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_8) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __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_L7_try_return:; __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_L0; __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:; } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("turbozipfile._check_zipfile", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_5is_zipfile(PyObject *__pyx_self, PyObject *__pyx_v_filename); static char __pyx_doc_12turbozipfile_4is_zipfile[] = "Quickly see if a file is a ZIP file by checking the magic number.\n\n The filename argument may be a file or file-like object too.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_5is_zipfile = {"is_zipfile", (PyCFunction)__pyx_pw_12turbozipfile_5is_zipfile, METH_O, __pyx_doc_12turbozipfile_4is_zipfile}; static PyObject *__pyx_pw_12turbozipfile_5is_zipfile(PyObject *__pyx_self, PyObject *__pyx_v_filename) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_zipfile (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_4is_zipfile(__pyx_self, ((PyObject *)__pyx_v_filename)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4is_zipfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_fp = NULL; 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; 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; int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_zipfile", 0); __Pyx_INCREF(Py_False); __pyx_v_result = Py_False; { __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); { __pyx_t_4 = __Pyx_HasAttr(__pyx_v_filename, __pyx_n_u_read); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 205, __pyx_L3_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_check_zipfile); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 206, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 206, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_fp, __pyx_v_filename) < 0) __PYX_ERR(0, 206, __pyx_L3_error) __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 206, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9; } { { __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_filename); __Pyx_INCREF(__pyx_n_u_rb); __Pyx_GIVEREF(__pyx_n_u_rb); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_u_rb); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 208, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_7, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 208, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_7, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 208, __pyx_L10_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_CallOneArg(__pyx_t_6, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_t_8; __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); { __pyx_v_fp = __pyx_t_6; __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_check_zipfile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 209, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; 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_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_fp) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_fp); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 209, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L19_try_end; __pyx_L14_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; { __Pyx_AddTraceback("turbozipfile.is_zipfile", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 208, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 208, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 208, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_14); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_5 < 0) __PYX_ERR(0, 208, __pyx_L16_except_error) __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __PYX_ERR(0, 208, __pyx_L16_except_error) } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L15_exception_handled; } __pyx_L16_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L3_error; __pyx_L15_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_L19_try_end:; } } { { if (__pyx_t_9) { __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 208, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } goto __pyx_L13; } __pyx_L13:; } goto __pyx_L23; __pyx_L10_error:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L3_error; __pyx_L23:; } } __pyx_L9:; } __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:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_15) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __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:; } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; 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("turbozipfile.is_zipfile", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_fp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7_EndRecData64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_6_EndRecData64[] = "\n Read the ZIP64 end-of-archive records and use that to update endrec\n "; static PyMethodDef __pyx_mdef_12turbozipfile_7_EndRecData64 = {"_EndRecData64", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7_EndRecData64, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_6_EndRecData64}; static PyObject *__pyx_pw_12turbozipfile_7_EndRecData64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fpin = 0; PyObject *__pyx_v_offset = 0; PyObject *__pyx_v_endrec = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_EndRecData64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fpin,&__pyx_n_s_offset,&__pyx_n_s_endrec,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_fpin)) != 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_offset)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_EndRecData64", 1, 3, 3, 1); __PYX_ERR(0, 215, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_endrec)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_EndRecData64", 1, 3, 3, 2); __PYX_ERR(0, 215, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_EndRecData64") < 0)) __PYX_ERR(0, 215, __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_fpin = values[0]; __pyx_v_offset = values[1]; __pyx_v_endrec = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_EndRecData64", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 215, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile._EndRecData64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_6_EndRecData64(__pyx_self, __pyx_v_fpin, __pyx_v_offset, __pyx_v_endrec); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_6_EndRecData64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fpin, PyObject *__pyx_v_offset, PyObject *__pyx_v_endrec) { PyObject *__pyx_v_data = NULL; PyObject *__pyx_v_sig = NULL; PyObject *__pyx_v_diskno = NULL; CYTHON_UNUSED PyObject *__pyx_v_reloff = NULL; PyObject *__pyx_v_disks = NULL; CYTHON_UNUSED PyObject *__pyx_v_sz = NULL; CYTHON_UNUSED PyObject *__pyx_v_create_version = NULL; CYTHON_UNUSED PyObject *__pyx_v_read_version = NULL; PyObject *__pyx_v_disk_num = NULL; PyObject *__pyx_v_disk_dir = NULL; PyObject *__pyx_v_dircount = NULL; PyObject *__pyx_v_dircount2 = NULL; PyObject *__pyx_v_dirsize = NULL; PyObject *__pyx_v_diroffset = 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; Py_ssize_t __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_EndRecData64", 0); { __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); { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpin, __pyx_n_s_seek); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sizeEndCentDir64Locator); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyNumber_Subtract(__pyx_v_offset, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 220, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; __pyx_t_8 = 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_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_int_2}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L3_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); __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_6, __pyx_t_7, __pyx_int_2}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L3_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 220, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_int_2); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __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:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __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; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_8) { __Pyx_AddTraceback("turbozipfile._EndRecData64", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 221, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_endrec); __pyx_r = __pyx_v_endrec; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L6_except_return; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __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_L6_except_return:; __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_L0; __pyx_L8_try_end:; } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpin, __pyx_n_s_read); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sizeEndCentDir64Locator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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_9 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_data = __pyx_t_9; __pyx_t_9 = 0; __pyx_t_10 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 227, __pyx_L1_error) __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sizeEndCentDir64Locator); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_9, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_11) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_endrec); __pyx_r = __pyx_v_endrec; goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_struct); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_unpack); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_structEndArchive64Locator); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_v_data}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_v_data}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_data); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 229, __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_6 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); } else { __pyx_t_9 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); __pyx_t_5 = PyList_GET_ITEM(sequence, 2); __pyx_t_7 = PyList_GET_ITEM(sequence, 3); } __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); #else { Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_9,&__pyx_t_6,&__pyx_t_5,&__pyx_t_7}; for (i=0; i < 4; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_9,&__pyx_t_6,&__pyx_t_5,&__pyx_t_7}; __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; for (index=0; index < 4; index++) { PyObject* item = __pyx_t_13(__pyx_t_12); if (unlikely(!item)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 4) < 0) __PYX_ERR(0, 229, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L13_unpacking_done; __pyx_L12_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 229, __pyx_L1_error) __pyx_L13_unpacking_done:; } __pyx_v_sig = __pyx_t_9; __pyx_t_9 = 0; __pyx_v_diskno = __pyx_t_6; __pyx_t_6 = 0; __pyx_v_reloff = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_disks = __pyx_t_7; __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_stringEndArchive64Locator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_RichCompare(__pyx_v_sig, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_11) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_endrec); __pyx_r = __pyx_v_endrec; goto __pyx_L0; } __pyx_t_7 = __Pyx_PyInt_NeObjC(__pyx_v_diskno, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_14) { } else { __pyx_t_11 = __pyx_t_14; goto __pyx_L16_bool_binop_done; } __pyx_t_7 = PyObject_RichCompare(__pyx_v_disks, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_11 = __pyx_t_14; __pyx_L16_bool_binop_done:; if (unlikely(__pyx_t_11)) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_zipfiles_that_span_multiple_disk) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_zipfiles_that_span_multiple_disk); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 234, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpin, __pyx_n_s_seek); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sizeEndCentDir64Locator); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyNumber_Subtract(__pyx_v_offset, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sizeEndCentDir64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = PyNumber_Subtract(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_8 = 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_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_9, __pyx_int_2}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_9, __pyx_int_2}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_int_2); __pyx_t_9 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpin, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sizeEndCentDir64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = NULL; 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_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_10 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 239, __pyx_L1_error) __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sizeEndCentDir64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_11) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_endrec); __pyx_r = __pyx_v_endrec; goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_struct); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_unpack); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_structEndArchive64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = NULL; __pyx_t_8 = 0; 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_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_4, __pyx_v_data}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_4, __pyx_v_data}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_v_data); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __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; if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 10)) { if (size > 10) __Pyx_RaiseTooManyValuesError(10); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 241, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3); __pyx_t_12 = PyTuple_GET_ITEM(sequence, 4); __pyx_t_15 = PyTuple_GET_ITEM(sequence, 5); __pyx_t_16 = PyTuple_GET_ITEM(sequence, 6); __pyx_t_17 = PyTuple_GET_ITEM(sequence, 7); __pyx_t_18 = PyTuple_GET_ITEM(sequence, 8); __pyx_t_19 = PyTuple_GET_ITEM(sequence, 9); } else { __pyx_t_7 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); __pyx_t_9 = PyList_GET_ITEM(sequence, 3); __pyx_t_12 = PyList_GET_ITEM(sequence, 4); __pyx_t_15 = PyList_GET_ITEM(sequence, 5); __pyx_t_16 = PyList_GET_ITEM(sequence, 6); __pyx_t_17 = PyList_GET_ITEM(sequence, 7); __pyx_t_18 = PyList_GET_ITEM(sequence, 8); __pyx_t_19 = PyList_GET_ITEM(sequence, 9); } __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(__pyx_t_16); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_19); #else { Py_ssize_t i; PyObject** temps[10] = {&__pyx_t_7,&__pyx_t_5,&__pyx_t_4,&__pyx_t_9,&__pyx_t_12,&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19}; for (i=0; i < 10; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; PyObject** temps[10] = {&__pyx_t_7,&__pyx_t_5,&__pyx_t_4,&__pyx_t_9,&__pyx_t_12,&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19}; __pyx_t_20 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_20)->tp_iternext; for (index=0; index < 10; index++) { PyObject* item = __pyx_t_13(__pyx_t_20); if (unlikely(!item)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_20), 10) < 0) __PYX_ERR(0, 241, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; goto __pyx_L20_unpacking_done; __pyx_L19_unpacking_failed:; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 241, __pyx_L1_error) __pyx_L20_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_sig, __pyx_t_7); __pyx_t_7 = 0; __pyx_v_sz = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_create_version = __pyx_t_4; __pyx_t_4 = 0; __pyx_v_read_version = __pyx_t_9; __pyx_t_9 = 0; __pyx_v_disk_num = __pyx_t_12; __pyx_t_12 = 0; __pyx_v_disk_dir = __pyx_t_15; __pyx_t_15 = 0; __pyx_v_dircount = __pyx_t_16; __pyx_t_16 = 0; __pyx_v_dircount2 = __pyx_t_17; __pyx_t_17 = 0; __pyx_v_dirsize = __pyx_t_18; __pyx_t_18 = 0; __pyx_v_diroffset = __pyx_t_19; __pyx_t_19 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_stringEndArchive64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_19 = PyObject_RichCompare(__pyx_v_sig, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_19); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_19); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (__pyx_t_11) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_endrec); __pyx_r = __pyx_v_endrec; goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_ECD_SIGNATURE); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); if (unlikely(PyObject_SetItem(__pyx_v_endrec, __pyx_t_19, __pyx_v_sig) < 0)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_ECD_DISK_NUMBER); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); if (unlikely(PyObject_SetItem(__pyx_v_endrec, __pyx_t_19, __pyx_v_disk_num) < 0)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_ECD_DISK_START); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); if (unlikely(PyObject_SetItem(__pyx_v_endrec, __pyx_t_19, __pyx_v_disk_dir) < 0)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_ECD_ENTRIES_THIS_DISK); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); if (unlikely(PyObject_SetItem(__pyx_v_endrec, __pyx_t_19, __pyx_v_dircount) < 0)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_ECD_ENTRIES_TOTAL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); if (unlikely(PyObject_SetItem(__pyx_v_endrec, __pyx_t_19, __pyx_v_dircount2) < 0)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_ECD_SIZE); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); if (unlikely(PyObject_SetItem(__pyx_v_endrec, __pyx_t_19, __pyx_v_dirsize) < 0)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_ECD_OFFSET); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); if (unlikely(PyObject_SetItem(__pyx_v_endrec, __pyx_t_19, __pyx_v_diroffset) < 0)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_endrec); __pyx_r = __pyx_v_endrec; 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_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); __Pyx_AddTraceback("turbozipfile._EndRecData64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_sig); __Pyx_XDECREF(__pyx_v_diskno); __Pyx_XDECREF(__pyx_v_reloff); __Pyx_XDECREF(__pyx_v_disks); __Pyx_XDECREF(__pyx_v_sz); __Pyx_XDECREF(__pyx_v_create_version); __Pyx_XDECREF(__pyx_v_read_version); __Pyx_XDECREF(__pyx_v_disk_num); __Pyx_XDECREF(__pyx_v_disk_dir); __Pyx_XDECREF(__pyx_v_dircount); __Pyx_XDECREF(__pyx_v_dircount2); __Pyx_XDECREF(__pyx_v_dirsize); __Pyx_XDECREF(__pyx_v_diroffset); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_9_EndRecData(PyObject *__pyx_self, PyObject *__pyx_v_fpin); static char __pyx_doc_12turbozipfile_8_EndRecData[] = "Return data from the \"End of Central Directory\" record, or None.\n\n The data is a list of the nine items in the ZIP \"End of central dir\"\n record followed by a tenth item, the file seek offset of this record.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_9_EndRecData = {"_EndRecData", (PyCFunction)__pyx_pw_12turbozipfile_9_EndRecData, METH_O, __pyx_doc_12turbozipfile_8_EndRecData}; static PyObject *__pyx_pw_12turbozipfile_9_EndRecData(PyObject *__pyx_self, PyObject *__pyx_v_fpin) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_EndRecData (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_8_EndRecData(__pyx_self, ((PyObject *)__pyx_v_fpin)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_8_EndRecData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fpin) { PyObject *__pyx_v_filesize = NULL; PyObject *__pyx_v_data = NULL; PyObject *__pyx_v_endrec = NULL; PyObject *__pyx_v_maxCommentStart = NULL; PyObject *__pyx_v_start = NULL; PyObject *__pyx_v_recData = NULL; PyObject *__pyx_v_commentSize = NULL; PyObject *__pyx_v_comment = 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; int __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_EndRecData", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpin, __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __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; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpin, __pyx_n_s_tell); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_filesize = __pyx_t_2; __pyx_t_2 = 0; { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpin, __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sizeEndCentDir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyNumber_Negative(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_int_2}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L3_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_int_2}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L3_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 273, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_int_2); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __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; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_8) { __Pyx_AddTraceback("turbozipfile._EndRecData", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_9) < 0) __PYX_ERR(0, 274, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L6_except_return; } goto __pyx_L5_except_error; __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L8_try_end:; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpin, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_9 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_data = __pyx_t_9; __pyx_t_9 = 0; __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 277, __pyx_L1_error) __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sizeEndCentDir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_9, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_12) { } else { __pyx_t_10 = __pyx_t_12; goto __pyx_L12_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 4, NULL, NULL, &__pyx_slice__4, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_stringEndArchive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_12) { } else { __pyx_t_10 = __pyx_t_12; goto __pyx_L12_bool_binop_done; } __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_data, -2L, 0, NULL, NULL, &__pyx_slice__5, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = (__Pyx_PyBytes_Equals(__pyx_t_9, __pyx_kp_b__6, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = __pyx_t_12; __pyx_L12_bool_binop_done:; if (__pyx_t_10) { __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_unpack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_structEndArchive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_v_data}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_v_data}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_v_data); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_endrec = __pyx_t_9; __pyx_t_9 = 0; __pyx_t_9 = PySequence_List(__pyx_v_endrec); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_endrec, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_endrec, __pyx_kp_b_); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sizeEndCentDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = PyNumber_Subtract(__pyx_v_filesize, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_endrec, __pyx_t_2); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_EndRecData64); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sizeEndCentDir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Negative(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_fpin, __pyx_t_1, __pyx_v_endrec}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_fpin, __pyx_t_1, __pyx_v_endrec}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_7 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_fpin); __Pyx_GIVEREF(__pyx_v_fpin); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_fpin); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_v_endrec); __Pyx_GIVEREF(__pyx_v_endrec); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_v_endrec); __pyx_t_1 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_t_14 = 0; __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_filesize, __pyx_int_65536, 0x10000, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sizeEndCentDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyNumber_Subtract(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __pyx_t_1; __pyx_t_1 = 0; } else { __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = __pyx_t_7; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __pyx_t_9; __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_maxCommentStart = __pyx_t_7; __pyx_t_7 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpin, __pyx_n_s_seek); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_maxCommentStart, __pyx_int_0}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_maxCommentStart, __pyx_int_0}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { __pyx_t_2 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(__pyx_v_maxCommentStart); __Pyx_GIVEREF(__pyx_v_maxCommentStart); PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_8, __pyx_v_maxCommentStart); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_8, __pyx_int_0); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpin, __pyx_n_s_read); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_rfind); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_stringEndArchive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_start = __pyx_t_7; __pyx_t_7 = 0; __pyx_t_7 = PyObject_RichCompare(__pyx_v_start, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 299, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_10) { __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sizeEndCentDir); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyNumber_Add(__pyx_v_start, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, &__pyx_v_start, &__pyx_t_9, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_recData = __pyx_t_7; __pyx_t_7 = 0; __pyx_t_11 = PyObject_Length(__pyx_v_recData); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 302, __pyx_L1_error) __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sizeEndCentDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, __pyx_t_9, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_10) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_struct); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_unpack); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_structEndArchive); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(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_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_9, __pyx_v_recData}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_9, __pyx_v_recData}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_v_recData); __Pyx_GIVEREF(__pyx_v_recData); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_v_recData); __pyx_t_9 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_endrec = __pyx_t_7; __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ECD_COMMENT_SIZE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_endrec, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_commentSize = __pyx_t_2; __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sizeEndCentDir); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyNumber_Add(__pyx_v_start, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sizeEndCentDir); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_v_start, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_commentSize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, &__pyx_t_7, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_comment = __pyx_t_3; __pyx_t_3 = 0; __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_endrec, __pyx_v_comment); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 308, __pyx_L1_error) __pyx_t_3 = PyNumber_Add(__pyx_v_maxCommentStart, __pyx_v_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_endrec, __pyx_t_3); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EndRecData64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyNumber_Add(__pyx_v_maxCommentStart, __pyx_v_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyNumber_Subtract(__pyx_t_7, __pyx_v_filesize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_fpin, __pyx_t_9, __pyx_v_endrec}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_fpin, __pyx_t_9, __pyx_v_endrec}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_1 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_v_fpin); __Pyx_GIVEREF(__pyx_v_fpin); PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_8, __pyx_v_fpin); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_v_endrec); __Pyx_GIVEREF(__pyx_v_endrec); PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_8, __pyx_v_endrec); __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __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; } __Pyx_XDECREF(__pyx_r); __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_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("turbozipfile._EndRecData", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_filesize); __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_endrec); __Pyx_XDECREF(__pyx_v_maxCommentStart); __Pyx_XDECREF(__pyx_v_start); __Pyx_XDECREF(__pyx_v_recData); __Pyx_XDECREF(__pyx_v_commentSize); __Pyx_XDECREF(__pyx_v_comment); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipInfo_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_7ZipInfo_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipInfo_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_7ZipInfo_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_filename = 0; PyObject *__pyx_v_orig_filename = 0; PyObject *__pyx_v_date_time = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,&__pyx_n_s_orig_filename,&__pyx_n_s_date_time,0}; PyObject* values[4] = {0,0,0,0}; values[3] = ((PyObject *)((PyObject*)__pyx_tuple__7)); 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_self)) != 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_filename)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 344, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_orig_filename)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 344, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_date_time); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 344, __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); 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_self = values[0]; __pyx_v_filename = values[1]; __pyx_v_orig_filename = values[2]; __pyx_v_date_time = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 344, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipInfo___init__(__pyx_self, __pyx_v_self, __pyx_v_filename, __pyx_v_orig_filename, __pyx_v_date_time); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipInfo___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_orig_filename, PyObject *__pyx_v_date_time) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_filename); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_orig_filename, __pyx_v_orig_filename) < 0) __PYX_ERR(0, 345, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u__8, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sep); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_v_filename, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_1 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sep); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; __pyx_t_8 = 0; 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_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_kp_u__8}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_kp_u__8}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_kp_u__8); __Pyx_GIVEREF(__pyx_kp_u__8); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_kp_u__8); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __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; __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_2); __pyx_t_2 = 0; } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filename, __pyx_v_filename) < 0) __PYX_ERR(0, 353, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_date_time, __pyx_v_date_time) < 0) __PYX_ERR(0, 354, __pyx_L1_error) __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_date_time, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_1980, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_1)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __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, 357, __pyx_L1_error) } __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ZIP_STORED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compress_type, __pyx_t_3) < 0) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compresslevel, Py_None) < 0) __PYX_ERR(0, 361, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comment, __pyx_kp_b_) < 0) __PYX_ERR(0, 362, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extra, __pyx_kp_b_) < 0) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_win32, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_create_system, __pyx_int_0) < 0) __PYX_ERR(0, 365, __pyx_L1_error) goto __pyx_L7; } { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_create_system, __pyx_int_3) < 0) __PYX_ERR(0, 368, __pyx_L1_error) } __pyx_L7:; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DEFAULT_VERSION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_create_version, __pyx_t_2) < 0) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DEFAULT_VERSION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extract_version, __pyx_t_2) < 0) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reserved, __pyx_int_0) < 0) __PYX_ERR(0, 371, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_flag_bits, __pyx_int_0) < 0) __PYX_ERR(0, 372, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_volume, __pyx_int_0) < 0) __PYX_ERR(0, 373, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internal_attr, __pyx_int_0) < 0) __PYX_ERR(0, 374, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_external_attr, __pyx_int_0) < 0) __PYX_ERR(0, 375, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compress_size, __pyx_int_0) < 0) __PYX_ERR(0, 376, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_size, __pyx_int_0) < 0) __PYX_ERR(0, 377, __pyx_L1_error) __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_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("turbozipfile.ZipInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_filename); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipInfo_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_7ZipInfo_3__repr__ = {"__repr__", (PyCFunction)__pyx_pw_12turbozipfile_7ZipInfo_3__repr__, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_7ZipInfo_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipInfo_2__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipInfo_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_hi = NULL; PyObject *__pyx_v_lo = NULL; PyObject *__pyx_v_isdir = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_UCS4 __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; __Pyx_INCREF(__pyx_kp_u__10); __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__10); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__10); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u_filename_2); __pyx_t_2 += 10; __Pyx_GIVEREF(__pyx_kp_u_filename_2); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_filename_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ZIP_STORED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_compressor_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(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_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __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, 387, __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_5); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_compress_type_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 385, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_external_attr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_RshiftObjC(__pyx_t_1, __pyx_int_16, 16, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_hi = __pyx_t_4; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_external_attr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyInt_AndObjC(__pyx_t_4, __pyx_int_65535, 0xFFFF, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_lo = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_hi); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 390, __pyx_L1_error) if (__pyx_t_6) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_stat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_filemode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_4, __pyx_v_hi) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_hi); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_filemode_r, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_lo); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 392, __pyx_L1_error) if (__pyx_t_6) { __pyx_t_10 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_external_attr_x, __pyx_v_lo); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_10 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_isdir = __pyx_t_10; __pyx_t_10 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_isdir); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 395, __pyx_L1_error) __pyx_t_13 = ((!__pyx_t_12) != 0); if (!__pyx_t_13) { } else { __pyx_t_6 = __pyx_t_13; goto __pyx_L7_bool_binop_done; } __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_size); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_6 = __pyx_t_13; __pyx_L7_bool_binop_done:; if (__pyx_t_6) { __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_size); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_file_size_r, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_isdir); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 397, __pyx_L1_error) __pyx_t_12 = ((!__pyx_t_13) != 0); if (!__pyx_t_12) { } else { goto __pyx_L11_next_and; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 397, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_12) { } else { __pyx_t_6 = __pyx_t_12; goto __pyx_L10_bool_binop_done; } __pyx_L11_next_and:; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_ZIP_STORED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_12) { } else { __pyx_t_6 = __pyx_t_12; goto __pyx_L10_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_size); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __pyx_t_12; __pyx_L10_bool_binop_done:; if (__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_compress_size_r, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_kp_u__11); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyUnicode_Join(__pyx_kp_u_, __pyx_v_result); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; 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_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("turbozipfile.ZipInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_hi); __Pyx_XDECREF(__pyx_v_lo); __Pyx_XDECREF(__pyx_v_isdir); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipInfo_5_decodeExtra(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_7ZipInfo_5_decodeExtra = {"_decodeExtra", (PyCFunction)__pyx_pw_12turbozipfile_7ZipInfo_5_decodeExtra, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_7ZipInfo_5_decodeExtra(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_decodeExtra (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipInfo_4_decodeExtra(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipInfo_4_decodeExtra(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_extra = NULL; PyObject *__pyx_v_unpack = NULL; PyObject *__pyx_v_tp = NULL; PyObject *__pyx_v_ln = NULL; PyObject *__pyx_v_data = NULL; PyObject *__pyx_v_field = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); Py_UCS4 __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_decodeExtra", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extra); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_extra = __pyx_t_1; __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_unpack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_unpack = __pyx_t_2; __pyx_t_2 = 0; while (1) { __pyx_t_3 = PyObject_Length(__pyx_v_extra); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 408, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 >= 4) != 0); if (!__pyx_t_4) break; __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_extra, 0, 4, NULL, NULL, &__pyx_slice__12, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_unpack); __pyx_t_5 = __pyx_v_unpack; __pyx_t_6 = NULL; __pyx_t_7 = 0; 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_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_HH, __pyx_t_1}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_HH, __pyx_t_1}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __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(0, 409, __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_kp_u_HH); __Pyx_GIVEREF(__pyx_kp_u_HH); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_u_HH); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { 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(0, 409, __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_8 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_8 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_8)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_1), 2) < 0) __PYX_ERR(0, 409, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 409, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_tp, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_ln, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_ln, __pyx_int_4, 4, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Length(__pyx_v_extra); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 410, __pyx_L1_error) __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__pyx_t_4)) { __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_10 = 127; __Pyx_INCREF(__pyx_kp_u_Corrupt_extra_field); __pyx_t_3 += 20; __Pyx_GIVEREF(__pyx_kp_u_Corrupt_extra_field); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Corrupt_extra_field); __pyx_t_1 = __Pyx_PyObject_Format(__pyx_v_tp, __pyx_kp_u_04x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10; __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_size); __pyx_t_3 += 7; __Pyx_GIVEREF(__pyx_kp_u_size); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_size); __pyx_t_1 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_v_ln), __pyx_n_u_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10; __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__13); __pyx_t_3 += 1; __Pyx_GIVEREF(__pyx_kp_u__13); PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__13); __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(0, 411, __pyx_L1_error) } __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_tp, __pyx_int_1, 0x0001, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 412, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_ln, __pyx_int_4, 4, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_extra, 4, 0, NULL, &__pyx_t_5, NULL, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_8); __pyx_t_8 = 0; { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 416, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = PyObject_RichCompare(__pyx_t_8, __pyx_int_18446744073709551615, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 416, __pyx_L9_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 416, __pyx_L9_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_14) { } else { __pyx_t_4 = __pyx_t_14; goto __pyx_L18_bool_binop_done; } __pyx_t_5 = PyObject_RichCompare(__pyx_t_8, __pyx_int_4294967295, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 416, __pyx_L9_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 416, __pyx_L9_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __pyx_t_14; __pyx_L18_bool_binop_done:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = (__pyx_t_4 != 0); if (__pyx_t_14) { __Pyx_INCREF(__pyx_kp_u_File_size); __Pyx_XDECREF_SET(__pyx_v_field, __pyx_kp_u_File_size); __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 8, NULL, NULL, &__pyx_slice__14, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 418, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_unpack); __pyx_t_1 = __pyx_v_unpack; __pyx_t_2 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __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_2, __pyx_kp_u_Q, __pyx_t_5}; __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(0, 418, __pyx_L9_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_u_Q, __pyx_t_5}; __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(0, 418, __pyx_L9_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_kp_u_Q); __Pyx_GIVEREF(__pyx_kp_u_Q); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_kp_u_Q); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 418, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 != 1)) { if (size > 1) __Pyx_RaiseTooManyValuesError(1); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 418, __pyx_L9_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); } __Pyx_INCREF(__pyx_t_1); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L20_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_6), 1) < 0) __PYX_ERR(0, 418, __pyx_L9_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L21_unpacking_done; __pyx_L20_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 418, __pyx_L9_error) __pyx_L21_unpacking_done:; } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_size, __pyx_t_1) < 0) __PYX_ERR(0, 418, __pyx_L9_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_data, 8, 0, NULL, NULL, &__pyx_slice__15, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 419, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_8); __pyx_t_8 = 0; } __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 420, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_int_4294967295, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L9_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 420, __pyx_L9_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_14) { __Pyx_INCREF(__pyx_kp_u_Compress_size); __Pyx_XDECREF_SET(__pyx_v_field, __pyx_kp_u_Compress_size); __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 8, NULL, NULL, &__pyx_slice__14, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 422, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_unpack); __pyx_t_6 = __pyx_v_unpack; __pyx_t_5 = NULL; __pyx_t_7 = 0; 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_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_Q, __pyx_t_8}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L9_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __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_5, __pyx_kp_u_Q, __pyx_t_8}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L9_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_u_Q); __Pyx_GIVEREF(__pyx_kp_u_Q); PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_kp_u_Q); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 1)) { if (size > 1) __Pyx_RaiseTooManyValuesError(1); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 422, __pyx_L9_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); } __Pyx_INCREF(__pyx_t_6); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 422, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L23_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_2), 1) < 0) __PYX_ERR(0, 422, __pyx_L9_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L24_unpacking_done; __pyx_L23_unpacking_failed:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 422, __pyx_L9_error) __pyx_L24_unpacking_done:; } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compress_size, __pyx_t_6) < 0) __PYX_ERR(0, 422, __pyx_L9_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_data, 8, 0, NULL, NULL, &__pyx_slice__15, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_int_4294967295, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 424, __pyx_L9_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 424, __pyx_L9_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_14) { __Pyx_INCREF(__pyx_kp_u_Header_offset); __Pyx_XDECREF_SET(__pyx_v_field, __pyx_kp_u_Header_offset); __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 8, NULL, NULL, &__pyx_slice__14, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_unpack); __pyx_t_2 = __pyx_v_unpack; __pyx_t_8 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __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[3] = {__pyx_t_8, __pyx_kp_u_Q, __pyx_t_1}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L9_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_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_kp_u_Q, __pyx_t_1}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L9_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_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_kp_u_Q); __Pyx_GIVEREF(__pyx_kp_u_Q); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_kp_u_Q); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 1)) { if (size > 1) __Pyx_RaiseTooManyValuesError(1); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 426, __pyx_L9_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); } __Pyx_INCREF(__pyx_t_2); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_5), 1) < 0) __PYX_ERR(0, 426, __pyx_L9_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L27_unpacking_done; __pyx_L26_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 426, __pyx_L9_error) __pyx_L27_unpacking_done:; } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header_offset, __pyx_t_2) < 0) __PYX_ERR(0, 426, __pyx_L9_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L16_try_end; __pyx_L9_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_2, &__pyx_t_5); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 427, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_6, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_ErrRestore(__pyx_t_6, __pyx_t_2, __pyx_t_5); __pyx_t_6 = 0; __pyx_t_2 = 0; __pyx_t_5 = 0; if (__pyx_t_7) { __Pyx_AddTraceback("turbozipfile.ZipInfo._decodeExtra", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_6) < 0) __PYX_ERR(0, 427, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 428, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_3 = 0; __pyx_t_10 = 127; __Pyx_INCREF(__pyx_kp_u_Corrupt_zip64_extra_field); __pyx_t_3 += 27; __Pyx_GIVEREF(__pyx_kp_u_Corrupt_zip64_extra_field); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_kp_u_Corrupt_zip64_extra_field); if (unlikely(!__pyx_v_field)) { __Pyx_RaiseUnboundLocalError("field"); __PYX_ERR(0, 429, __pyx_L11_except_error) } __Pyx_INCREF(__pyx_v_field); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_field) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_field) : __pyx_t_10; __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_v_field); __Pyx_INCREF(__pyx_kp_u_not_found); __pyx_t_3 += 11; __Pyx_GIVEREF(__pyx_kp_u_not_found); PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_kp_u_not_found); __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 3, __pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 428, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_8 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_15, __pyx_t_16) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_16); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 428, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, Py_None); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 428, __pyx_L11_except_error) } goto __pyx_L11_except_error; __pyx_L11_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L1_error; __pyx_L16_try_end:; } } __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_ln, __pyx_int_4, 4, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_extra, 0, 0, &__pyx_t_6, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_extra, __pyx_t_2); __pyx_t_2 = 0; } __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_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("turbozipfile.ZipInfo._decodeExtra", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_extra); __Pyx_XDECREF(__pyx_v_unpack); __Pyx_XDECREF(__pyx_v_tp); __Pyx_XDECREF(__pyx_v_ln); __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_field); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipInfo_7is_dir(PyObject *__pyx_self, PyObject *__pyx_v_self); static char __pyx_doc_12turbozipfile_7ZipInfo_6is_dir[] = "Return True if this archive member is a directory."; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipInfo_7is_dir = {"is_dir", (PyCFunction)__pyx_pw_12turbozipfile_7ZipInfo_7is_dir, METH_O, __pyx_doc_12turbozipfile_7ZipInfo_6is_dir}; static PyObject *__pyx_pw_12turbozipfile_7ZipInfo_7is_dir(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_dir (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipInfo_6is_dir(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipInfo_6is_dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_dir", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_u__8, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("turbozipfile.ZipInfo.is_dir", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_11_gen_crc(PyObject *__pyx_self, PyObject *__pyx_v_crc); static PyMethodDef __pyx_mdef_12turbozipfile_11_gen_crc = {"_gen_crc", (PyCFunction)__pyx_pw_12turbozipfile_11_gen_crc, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_11_gen_crc(PyObject *__pyx_self, PyObject *__pyx_v_crc) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_gen_crc (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_10_gen_crc(__pyx_self, ((PyObject *)__pyx_v_crc)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10_gen_crc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_crc) { CYTHON_UNUSED long __pyx_v_j; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations long __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_gen_crc", 0); __Pyx_INCREF(__pyx_v_crc); for (__pyx_t_1 = 0; __pyx_t_1 < 8; __pyx_t_1+=1) { __pyx_v_j = __pyx_t_1; __pyx_t_2 = __Pyx_PyInt_AndObjC(__pyx_v_crc, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_crc, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyNumber_Xor(__pyx_t_2, __pyx_int_3988292384); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_crc, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } { __pyx_t_4 = __Pyx_PyInt_RshiftObjC(__pyx_v_crc, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_crc, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L5:; } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_crc); __pyx_r = __pyx_v_crc; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("turbozipfile._gen_crc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_crc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_13_ZipDecrypter(PyObject *__pyx_self, PyObject *__pyx_v_pwd); static PyMethodDef __pyx_mdef_12turbozipfile_13_ZipDecrypter = {"_ZipDecrypter", (PyCFunction)__pyx_pw_12turbozipfile_13_ZipDecrypter, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_13_ZipDecrypter(PyObject *__pyx_self, PyObject *__pyx_v_pwd) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_ZipDecrypter (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_12_ZipDecrypter(__pyx_self, ((PyObject *)__pyx_v_pwd)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_13_ZipDecrypter_1crc32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_13_ZipDecrypter_crc32[] = "Compute the CRC32 primitive on one byte."; static PyMethodDef __pyx_mdef_12turbozipfile_13_ZipDecrypter_1crc32 = {"crc32", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_13_ZipDecrypter_1crc32, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_13_ZipDecrypter_crc32}; static PyObject *__pyx_pw_12turbozipfile_13_ZipDecrypter_1crc32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ch = 0; PyObject *__pyx_v_crc = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("crc32 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ch,&__pyx_n_s_crc,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_ch)) != 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_crc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("crc32", 1, 2, 2, 1); __PYX_ERR(0, 473, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "crc32") < 0)) __PYX_ERR(0, 473, __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_ch = values[0]; __pyx_v_crc = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("crc32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 473, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile._ZipDecrypter.crc32", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_13_ZipDecrypter_crc32(__pyx_self, __pyx_v_ch, __pyx_v_crc); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_13_ZipDecrypter_crc32(PyObject *__pyx_self, PyObject *__pyx_v_ch, PyObject *__pyx_v_crc) { struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *__pyx_cur_scope; struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("crc32", 0); __pyx_outer_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_RshiftObjC(__pyx_v_crc, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(!__pyx_cur_scope->__pyx_v_crctable)) { __Pyx_RaiseClosureNameError("crctable"); __PYX_ERR(0, 475, __pyx_L1_error) } __pyx_t_2 = PyNumber_Xor(__pyx_v_crc, __pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_crctable, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Xor(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __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; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile._ZipDecrypter.crc32", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_13_ZipDecrypter_3update_keys(PyObject *__pyx_self, PyObject *__pyx_v_c); static PyMethodDef __pyx_mdef_12turbozipfile_13_ZipDecrypter_3update_keys = {"update_keys", (PyCFunction)__pyx_pw_12turbozipfile_13_ZipDecrypter_3update_keys, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_13_ZipDecrypter_3update_keys(PyObject *__pyx_self, PyObject *__pyx_v_c) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update_keys (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_13_ZipDecrypter_2update_keys(__pyx_self, ((PyObject *)__pyx_v_c)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_13_ZipDecrypter_2update_keys(PyObject *__pyx_self, PyObject *__pyx_v_c) { struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *__pyx_cur_scope; struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update_keys", 0); __pyx_outer_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; if (unlikely(!__pyx_cur_scope->__pyx_v_key0)) { __Pyx_RaiseClosureNameError("key0"); __PYX_ERR(0, 479, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_v_key0; __Pyx_INCREF(__pyx_t_1); if (unlikely(!__pyx_cur_scope->__pyx_v_crc32)) { __Pyx_RaiseClosureNameError("crc32"); __PYX_ERR(0, 479, __pyx_L1_error) } __pyx_t_2 = __pyx_pf_12turbozipfile_13_ZipDecrypter_crc32(__pyx_cur_scope->__pyx_v_crc32, __pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key0); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_cur_scope->__pyx_v_key1)) { __Pyx_RaiseClosureNameError("key1"); __PYX_ERR(0, 480, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyInt_AndObjC(__pyx_cur_scope->__pyx_v_key0, __pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_Add(__pyx_cur_scope->__pyx_v_key1, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_4294967295); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key1); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_key1, __pyx_int_134775813); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_4294967295); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_key1); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_key1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_cur_scope->__pyx_v_key1, __pyx_int_24, 24, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(!__pyx_cur_scope->__pyx_v_key2)) { __Pyx_RaiseClosureNameError("key2"); __PYX_ERR(0, 482, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_v_key2; __Pyx_INCREF(__pyx_t_1); if (unlikely(!__pyx_cur_scope->__pyx_v_crc32)) { __Pyx_RaiseClosureNameError("crc32"); __PYX_ERR(0, 482, __pyx_L1_error) } __pyx_t_3 = __pyx_pf_12turbozipfile_13_ZipDecrypter_crc32(__pyx_cur_scope->__pyx_v_crc32, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key2); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __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("turbozipfile._ZipDecrypter.update_keys", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_13_ZipDecrypter_5decrypter(PyObject *__pyx_self, PyObject *__pyx_v_data); static char __pyx_doc_12turbozipfile_13_ZipDecrypter_4decrypter[] = "Decrypt a bytes object."; static PyMethodDef __pyx_mdef_12turbozipfile_13_ZipDecrypter_5decrypter = {"decrypter", (PyCFunction)__pyx_pw_12turbozipfile_13_ZipDecrypter_5decrypter, METH_O, __pyx_doc_12turbozipfile_13_ZipDecrypter_4decrypter}; static PyObject *__pyx_pw_12turbozipfile_13_ZipDecrypter_5decrypter(PyObject *__pyx_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("decrypter (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_13_ZipDecrypter_4decrypter(__pyx_self, ((PyObject *)__pyx_v_data)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_13_ZipDecrypter_4decrypter(PyObject *__pyx_self, PyObject *__pyx_v_data) { struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *__pyx_cur_scope; struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *__pyx_outer_scope; PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_append = NULL; PyObject *__pyx_v_c = NULL; PyObject *__pyx_v_k = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("decrypter", 0); __pyx_outer_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_append = __pyx_t_1; __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) { __pyx_t_1 = __pyx_v_data; __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_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __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(0, 491, __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(0, 491, __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(0, 491, __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(0, 491, __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(0, 491, __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(0, 491, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_cur_scope->__pyx_v_key2)) { __Pyx_RaiseClosureNameError("key2"); __PYX_ERR(0, 492, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyInt_OrObjC(__pyx_cur_scope->__pyx_v_key2, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_XorObjC(__pyx_v_k, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Multiply(__pyx_v_k, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_RshiftObjC(__pyx_t_5, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_AndObjC(__pyx_t_4, __pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_InPlaceXor(__pyx_v_c, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_c, __pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_cur_scope->__pyx_v_update_keys)) { __Pyx_RaiseClosureNameError("update_keys"); __PYX_ERR(0, 494, __pyx_L1_error) } __pyx_t_4 = __pyx_pf_12turbozipfile_13_ZipDecrypter_2update_keys(__pyx_cur_scope->__pyx_v_update_keys, __pyx_v_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyByteArray_AppendObject(__pyx_v_result, __pyx_v_c); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 495, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("turbozipfile._ZipDecrypter.decrypter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_append); __Pyx_XDECREF(__pyx_v_c); __Pyx_XDECREF(__pyx_v_k); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_12_ZipDecrypter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pwd) { struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *__pyx_cur_scope; PyObject *__pyx_v_p = NULL; PyObject *__pyx_v_decrypter = 0; 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; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ZipDecrypter", 0); __pyx_cur_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *)__pyx_tp_new_12turbozipfile___pyx_scope_struct___ZipDecrypter(__pyx_ptype_12turbozipfile___pyx_scope_struct___ZipDecrypter, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 463, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __Pyx_INCREF(__pyx_int_305419896); __Pyx_GIVEREF(__pyx_int_305419896); __pyx_cur_scope->__pyx_v_key0 = __pyx_int_305419896; __Pyx_INCREF(__pyx_int_591751049); __Pyx_GIVEREF(__pyx_int_591751049); __pyx_cur_scope->__pyx_v_key1 = __pyx_int_591751049; __Pyx_INCREF(__pyx_int_878082192); __Pyx_GIVEREF(__pyx_int_878082192); __pyx_cur_scope->__pyx_v_key2 = __pyx_int_878082192; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_crctable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_gen_crc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 470, __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_PyObject_Call(__pyx_builtin_map, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_crctable, __pyx_t_5) < 0) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_crctable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_crctable = __pyx_t_5; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_13_ZipDecrypter_1crc32, 0, __pyx_n_s_ZipDecrypter_locals_crc32, ((PyObject*)__pyx_cur_scope), __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_crc32 = __pyx_t_5; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_13_ZipDecrypter_3update_keys, 0, __pyx_n_s_ZipDecrypter_locals_update_keys, ((PyObject*)__pyx_cur_scope), __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_update_keys = __pyx_t_5; __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_v_pwd)) || PyTuple_CheckExact(__pyx_v_pwd)) { __pyx_t_5 = __pyx_v_pwd; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_pwd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 484, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 484, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 484, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_5); 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, 484, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_pf_12turbozipfile_13_ZipDecrypter_2update_keys(__pyx_cur_scope->__pyx_v_update_keys, __pyx_v_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_13_ZipDecrypter_5decrypter, 0, __pyx_n_s_ZipDecrypter_locals_decrypter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_decrypter = __pyx_t_5; __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_decrypter); __pyx_r = __pyx_v_decrypter; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("turbozipfile._ZipDecrypter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_p); __Pyx_XDECREF(__pyx_v_decrypter); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_14LZMACompressor_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_14LZMACompressor_1__init__ = {"__init__", (PyCFunction)__pyx_pw_12turbozipfile_14LZMACompressor_1__init__, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_14LZMACompressor_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_14LZMACompressor___init__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_14LZMACompressor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comp, Py_None) < 0) __PYX_ERR(0, 504, __pyx_L1_error) __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("turbozipfile.LZMACompressor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_14LZMACompressor_3_init(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_14LZMACompressor_3_init = {"_init", (PyCFunction)__pyx_pw_12turbozipfile_14LZMACompressor_3_init, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_14LZMACompressor_3_init(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_init (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_14LZMACompressor_2_init(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_14LZMACompressor_2_init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_props = 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; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init", 0); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_lzma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode_filter_properties); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_lzma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_FILTER_LZMA1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_id, __pyx_t_5) < 0) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_props = __pyx_t_1; __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_lzma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LZMACompressor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_lzma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_FORMAT_RAW); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_lzma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode_filter_properties); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_lzma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_FILTER_LZMA1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __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[3] = {__pyx_t_4, __pyx_t_7, __pyx_v_props}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 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[3] = {__pyx_t_4, __pyx_t_7, __pyx_v_props}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_v_props); __Pyx_GIVEREF(__pyx_v_props); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_props); __pyx_t_7 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __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 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_filters, __pyx_t_6) < 0) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comp, __pyx_t_6) < 0) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_struct); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = PyObject_Length(__pyx_v_props); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 511, __pyx_L1_error) __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_kp_u_BBH, __pyx_int_9, __pyx_int_4, __pyx_t_2}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_kp_u_BBH, __pyx_int_9, __pyx_int_4, __pyx_t_2}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_5 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 511, __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_kp_u_BBH); __Pyx_GIVEREF(__pyx_kp_u_BBH); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_kp_u_BBH); __Pyx_INCREF(__pyx_int_9); __Pyx_GIVEREF(__pyx_int_9); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_int_9); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_8, __pyx_int_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_8, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_v_props); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; 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_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("turbozipfile.LZMACompressor._init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_props); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_14LZMACompressor_5compress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_14LZMACompressor_5compress = {"compress", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_14LZMACompressor_5compress, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_14LZMACompressor_5compress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_data = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("compress (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,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_self)) != 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_data)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("compress", 1, 2, 2, 1); __PYX_ERR(0, 513, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compress") < 0)) __PYX_ERR(0, 513, __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_self = values[0]; __pyx_v_data = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("compress", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 513, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.LZMACompressor.compress", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_14LZMACompressor_4compress(__pyx_self, __pyx_v_self, __pyx_v_data); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_14LZMACompressor_4compress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) { 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compress", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __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_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_compress); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; 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_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_compress); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; 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_AddTraceback("turbozipfile.LZMACompressor.compress", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_14LZMACompressor_7flush(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_14LZMACompressor_7flush = {"flush", (PyCFunction)__pyx_pw_12turbozipfile_14LZMACompressor_7flush, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_14LZMACompressor_7flush(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("flush (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_14LZMACompressor_6flush(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_14LZMACompressor_6flush(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flush", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __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_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_flush); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; 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_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; } __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; 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_AddTraceback("turbozipfile.LZMACompressor.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_16LZMADecompressor_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_16LZMADecompressor_1__init__ = {"__init__", (PyCFunction)__pyx_pw_12turbozipfile_16LZMADecompressor_1__init__, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_16LZMADecompressor_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_16LZMADecompressor___init__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_16LZMADecompressor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_decomp, Py_None) < 0) __PYX_ERR(0, 527, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_unconsumed, __pyx_kp_b_) < 0) __PYX_ERR(0, 528, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_eof, Py_False) < 0) __PYX_ERR(0, 529, __pyx_L1_error) __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("turbozipfile.LZMADecompressor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_16LZMADecompressor_3decompress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_16LZMADecompressor_3decompress = {"decompress", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_16LZMADecompressor_3decompress, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_16LZMADecompressor_3decompress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_data = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("decompress (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,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_self)) != 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_data)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("decompress", 1, 2, 2, 1); __PYX_ERR(0, 531, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decompress") < 0)) __PYX_ERR(0, 531, __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_self = values[0]; __pyx_v_data = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("decompress", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 531, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.LZMADecompressor.decompress", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_16LZMADecompressor_2decompress(__pyx_self, __pyx_v_self, __pyx_v_data); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_16LZMADecompressor_2decompress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_v_psize = NULL; PyObject *__pyx_v_result = 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; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *(*__pyx_t_10)(PyObject *); PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("decompress", 0); __Pyx_INCREF(__pyx_v_data); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decomp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unconsumed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_unconsumed, __pyx_t_4) < 0) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unconsumed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = ((__pyx_t_5 <= 4) != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_b_); __pyx_r = __pyx_kp_b_; goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_unpack); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unconsumed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_1, 2, 4, NULL, NULL, &__pyx_slice__23, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __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[3] = {__pyx_t_1, __pyx_kp_u_H, __pyx_t_7}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); __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[3] = {__pyx_t_1, __pyx_kp_u_H, __pyx_t_7}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(__pyx_kp_u_H); __Pyx_GIVEREF(__pyx_kp_u_H); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_u_H); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 536, __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; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 1)) { if (size > 1) __Pyx_RaiseTooManyValuesError(1); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 536, __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); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); } __Pyx_INCREF(__pyx_t_6); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 1) < 0) __PYX_ERR(0, 536, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_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, 536, __pyx_L1_error) __pyx_L6_unpacking_done:; } __pyx_v_psize = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unconsumed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_AddCObj(__pyx_int_4, __pyx_v_psize, 4, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_LE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_b_); __pyx_r = __pyx_kp_b_; goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_lzma); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_LZMADecompressor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_lzma); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_FORMAT_RAW); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __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; __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_lzma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode_filter_properties); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_lzma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_FILTER_LZMA1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unconsumed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = __Pyx_PyInt_AddCObj(__pyx_int_4, __pyx_v_psize, 4, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_t_1, 4, 0, NULL, &__pyx_t_13, NULL, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_12, __pyx_t_14}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_12, __pyx_t_14}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif { __pyx_t_1 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_8, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_t_14); __pyx_t_12 = 0; __pyx_t_14 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_filters, __pyx_t_11) < 0) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_decomp, __pyx_t_11) < 0) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unconsumed); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyInt_AddCObj(__pyx_int_4, __pyx_v_psize, 4, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_t_11, 0, 0, &__pyx_t_4, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_9); __pyx_t_9 = 0; if (__Pyx_PyObject_DelAttrStr(__pyx_v_self, __pyx_n_s_unconsumed) < 0) __PYX_ERR(0, 547, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decomp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decompress); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } __pyx_t_9 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_4, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_data); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_result = __pyx_t_9; __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decomp); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_eof); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_eof, __pyx_t_11) < 0) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("turbozipfile.LZMADecompressor.decompress", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_psize); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_data); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_15_check_compression(PyObject *__pyx_self, PyObject *__pyx_v_compression); static PyMethodDef __pyx_mdef_12turbozipfile_15_check_compression = {"_check_compression", (PyCFunction)__pyx_pw_12turbozipfile_15_check_compression, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_15_check_compression(PyObject *__pyx_self, PyObject *__pyx_v_compression) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_compression (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_14_check_compression(__pyx_self, ((PyObject *)__pyx_v_compression)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_14_check_compression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_compression) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_compression", 0); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ZIP_STORED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_v_compression, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __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(0, 576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { goto __pyx_L3; } __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ZIP_DEFLATED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_v_compression, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_zlib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_4)) { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __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, 580, __pyx_L1_error) } goto __pyx_L3; } __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ZIP_BZIP2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_v_compression, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bz2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = ((!__pyx_t_4) != 0); if (unlikely(__pyx_t_3)) { __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __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(0, 583, __pyx_L1_error) } goto __pyx_L3; } __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ZIP_LZMA); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_v_compression, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(__pyx_t_3)) { __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_lzma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_4)) { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __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, 586, __pyx_L1_error) } goto __pyx_L3; } { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __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, 588, __pyx_L1_error) } __pyx_L3:; __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("turbozipfile._check_compression", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_17_get_compressor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_17_get_compressor = {"_get_compressor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_17_get_compressor, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_17_get_compressor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_compress_type = 0; PyObject *__pyx_v_compresslevel = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_compressor (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_compress_type,&__pyx_n_s_compresslevel_2,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((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_compress_type)) != 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_compresslevel_2); 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_compressor") < 0)) __PYX_ERR(0, 591, __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_compress_type = values[0]; __pyx_v_compresslevel = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_compressor", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 591, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile._get_compressor", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_16_get_compressor(__pyx_self, __pyx_v_compress_type, __pyx_v_compresslevel); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_16_get_compressor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_compress_type, PyObject *__pyx_v_compresslevel) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_compressor", 0); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ZIP_DEFLATED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_v_compress_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __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(0, 592, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __pyx_t_3 = (__pyx_v_compresslevel != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_zlib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compressobj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_zlib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DEFLATED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __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_1, __pyx_v_compresslevel, __pyx_t_6, __pyx_int_neg_15}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); __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[4] = {__pyx_t_1, __pyx_v_compresslevel, __pyx_t_6, __pyx_int_neg_15}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(__pyx_v_compresslevel); __Pyx_GIVEREF(__pyx_v_compresslevel); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_compresslevel); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_int_neg_15); __Pyx_GIVEREF(__pyx_int_neg_15); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_int_neg_15); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_zlib); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_compressobj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_zlib); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Z_DEFAULT_COMPRESSION); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_zlib); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DEFLATED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_6, __pyx_t_1, __pyx_int_neg_15}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_6, __pyx_t_1, __pyx_int_neg_15}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_9 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_1); __Pyx_INCREF(__pyx_int_neg_15); __Pyx_GIVEREF(__pyx_int_neg_15); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_7, __pyx_int_neg_15); __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ZIP_BZIP2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyObject_RichCompare(__pyx_v_compress_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_4) { __pyx_t_4 = (__pyx_v_compresslevel != Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bz2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_BZ2Compressor); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_2, __pyx_v_compresslevel) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_compresslevel); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_bz2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_BZ2Compressor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ZIP_LZMA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyObject_RichCompare(__pyx_v_compress_type, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_LZMACompressor); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __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_2 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } { __Pyx_XDECREF(__pyx_r); __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_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("turbozipfile._get_compressor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_19_get_decompressor(PyObject *__pyx_self, PyObject *__pyx_v_compress_type); static PyMethodDef __pyx_mdef_12turbozipfile_19_get_decompressor = {"_get_decompressor", (PyCFunction)__pyx_pw_12turbozipfile_19_get_decompressor, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_19_get_decompressor(PyObject *__pyx_self, PyObject *__pyx_v_compress_type) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_decompressor (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_18_get_decompressor(__pyx_self, ((PyObject *)__pyx_v_compress_type)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_18_get_decompressor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_compress_type) { PyObject *__pyx_v_descr = NULL; 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; Py_ssize_t __pyx_t_5; Py_UCS4 __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_decompressor", 0); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_compression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_compress_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_compress_type); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __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; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ZIP_STORED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_v_compress_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ZIP_DEFLATED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_v_compress_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_zlib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_decompressobj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __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_int_neg_15) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_neg_15); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ZIP_BZIP2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_v_compress_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_bz2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BZ2Decompressor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __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; } __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ZIP_LZMA); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_RichCompare(__pyx_v_compress_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LZMADecompressor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __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; } { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_compressor_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_compress_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_compress_type); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_descr = __pyx_t_2; __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_descr); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 619, __pyx_L1_error) if (unlikely(__pyx_t_4)) { __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = 127; __Pyx_INCREF(__pyx_kp_u_compression_type); __pyx_t_5 += 17; __Pyx_GIVEREF(__pyx_kp_u_compression_type); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_compression_type); __pyx_t_1 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_v_compress_type), __pyx_n_u_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_6; __pyx_t_5 += __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__28); __pyx_t_5 += 2; __Pyx_GIVEREF(__pyx_kp_u__28); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__28); __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_descr), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_6; __pyx_t_5 += __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__13); __pyx_t_5 += 1; __Pyx_GIVEREF(__pyx_kp_u__13); PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__13); __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __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_NotImplementedError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 620, __pyx_L1_error) } { __pyx_t_2 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_v_compress_type), __pyx_n_u_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_compression_type, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __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_NotImplementedError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 623, __pyx_L1_error) } } __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile._get_decompressor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_descr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_11_SharedFile_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_11_SharedFile_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_11_SharedFile_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_11_SharedFile_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_file = 0; PyObject *__pyx_v_pos = 0; PyObject *__pyx_v_close = 0; PyObject *__pyx_v_lock = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_file,&__pyx_n_s_pos,&__pyx_n_s_close,&__pyx_n_s_lock,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_self)) != 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_file)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 628, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 628, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_close)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 628, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lock)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 628, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 628, __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_self = values[0]; __pyx_v_file = values[1]; __pyx_v_pos = values[2]; __pyx_v_close = values[3]; __pyx_v_lock = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 628, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile._SharedFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_11_SharedFile___init__(__pyx_self, __pyx_v_self, __pyx_v_file, __pyx_v_pos, __pyx_v_close, __pyx_v_lock); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_11_SharedFile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_pos, PyObject *__pyx_v_close, PyObject *__pyx_v_lock) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_2, __pyx_v_file) < 0) __PYX_ERR(0, 629, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pos_2, __pyx_v_pos) < 0) __PYX_ERR(0, 630, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_close_2, __pyx_v_close) < 0) __PYX_ERR(0, 631, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock_2, __pyx_v_lock) < 0) __PYX_ERR(0, 632, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_seekable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_seekable, __pyx_t_1) < 0) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_tell); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tell, __pyx_t_1) < 0) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("turbozipfile._SharedFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_11_SharedFile_3seek(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_11_SharedFile_3seek = {"seek", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_11_SharedFile_3seek, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_11_SharedFile_3seek(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_offset = 0; PyObject *__pyx_v_whence = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("seek (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_offset,&__pyx_n_s_whence,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)((PyObject *)__pyx_int_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_self)) != 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_offset)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("seek", 0, 2, 3, 1); __PYX_ERR(0, 636, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_whence); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) __PYX_ERR(0, 636, __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_self = values[0]; __pyx_v_offset = values[1]; __pyx_v_whence = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("seek", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile._SharedFile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_11_SharedFile_2seek(__pyx_self, __pyx_v_self, __pyx_v_offset, __pyx_v_whence); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_11_SharedFile_2seek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_whence) { 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; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("seek", 0); { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L3_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_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_seek); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_offset, __pyx_v_whence}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L7_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_4)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_offset, __pyx_v_whence}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L7_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_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 638, __pyx_L7_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_offset); __Pyx_GIVEREF(__pyx_v_offset); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_v_offset); __Pyx_INCREF(__pyx_v_whence); __Pyx_GIVEREF(__pyx_v_whence); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_v_whence); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L7_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; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 639, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tell); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 639, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; 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_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pos_2, __pyx_t_1) < 0) __PYX_ERR(0, 639, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L11_try_return; } __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __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; { __Pyx_AddTraceback("turbozipfile._SharedFile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 637, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 637, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < 0) __PYX_ERR(0, 637, __pyx_L9_except_error) __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_5, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __PYX_ERR(0, 637, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L11_try_return:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L4_return; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); } } { { if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_8 = __pyx_r; __pyx_r = 0; if (__pyx_t_2) { __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L16:; } __pyx_r = 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("turbozipfile._SharedFile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_11_SharedFile_5read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_11_SharedFile_5read = {"read", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_11_SharedFile_5read, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_11_SharedFile_5read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_n = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_n,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject *)__pyx_int_neg_1)); 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_self)) != 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_n); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 642, __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_self = values[0]; __pyx_v_n = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("read", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 642, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile._SharedFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_11_SharedFile_4read(__pyx_self, __pyx_v_self, __pyx_v_n); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_11_SharedFile_4read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_v_data = 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; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 0); { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L3_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_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_seek); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 644, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __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_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_1)) __PYX_ERR(0, 644, __pyx_L7_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_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 645, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_n); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_data = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tell); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pos_2, __pyx_t_1) < 0) __PYX_ERR(0, 646, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_data); __pyx_r = __pyx_v_data; goto __pyx_L11_try_return; } __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __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; { __Pyx_AddTraceback("turbozipfile._SharedFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 643, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 643, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_10 < 0) __PYX_ERR(0, 643, __pyx_L9_except_error) __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __PYX_ERR(0, 643, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L11_try_return:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L4_return; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); } } { { if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_8 = __pyx_r; __pyx_r = 0; if (__pyx_t_2) { __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L16:; } __pyx_r = 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("turbozipfile._SharedFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_11_SharedFile_7close(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_11_SharedFile_7close = {"close", (PyCFunction)__pyx_pw_12turbozipfile_11_SharedFile_7close, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_11_SharedFile_7close(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_11_SharedFile_6close(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_11_SharedFile_6close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_fileobj = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("close", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_fileobj = __pyx_t_1; __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_2, Py_None) < 0) __PYX_ERR(0, 652, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __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_fileobj) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_fileobj); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __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_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("turbozipfile._SharedFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fileobj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_9_Tellable_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_9_Tellable_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_9_Tellable_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_9_Tellable_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fp = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fp,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_self)) != 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_fp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 659, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 659, __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_self = values[0]; __pyx_v_fp = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 659, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile._Tellable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_9_Tellable___init__(__pyx_self, __pyx_v_self, __pyx_v_fp); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_9_Tellable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fp, __pyx_v_fp) < 0) __PYX_ERR(0, 660, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset, __pyx_int_0) < 0) __PYX_ERR(0, 661, __pyx_L1_error) __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("turbozipfile._Tellable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_9_Tellable_3write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_9_Tellable_3write = {"write", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_9_Tellable_3write, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_9_Tellable_3write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_data = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,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_self)) != 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_data)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("write", 1, 2, 2, 1); __PYX_ERR(0, 663, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write") < 0)) __PYX_ERR(0, 663, __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_self = values[0]; __pyx_v_data = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("write", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 663, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile._Tellable.write", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_9_Tellable_2write(__pyx_self, __pyx_v_self, __pyx_v_data); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_9_Tellable_2write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_v_n = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write", 0); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __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 && likely(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_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset, __pyx_t_3) < 0) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_n); __pyx_r = __pyx_v_n; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile._Tellable.write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_9_Tellable_5tell(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_9_Tellable_5tell = {"tell", (PyCFunction)__pyx_pw_12turbozipfile_9_Tellable_5tell, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_9_Tellable_5tell(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tell (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_9_Tellable_4tell(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_9_Tellable_4tell(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tell", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("turbozipfile._Tellable.tell", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_9_Tellable_7flush(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_9_Tellable_7flush = {"flush", (PyCFunction)__pyx_pw_12turbozipfile_9_Tellable_7flush, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_9_Tellable_7flush(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("flush (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_9_Tellable_6flush(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_9_Tellable_6flush(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flush", 0); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_flush); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __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 && likely(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_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __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; __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("turbozipfile._Tellable.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_9_Tellable_9close(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_9_Tellable_9close = {"close", (PyCFunction)__pyx_pw_12turbozipfile_9_Tellable_9close, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_9_Tellable_9close(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_9_Tellable_8close(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_9_Tellable_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("close", 0); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 675, __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 && likely(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_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __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; __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("turbozipfile._Tellable.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_10ZipExtFile_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fileobj = 0; CYTHON_UNUSED PyObject *__pyx_v_mode = 0; PyObject *__pyx_v_zipinfo = 0; PyObject *__pyx_v_pwd = 0; PyObject *__pyx_v_close_fileobj = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fileobj,&__pyx_n_s_mode,&__pyx_n_s_zipinfo,&__pyx_n_s_pwd,&__pyx_n_s_close_fileobj,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[4] = ((PyObject *)((PyObject *)Py_None)); values[5] = ((PyObject *)((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 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_self)) != 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_fileobj)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 1); __PYX_ERR(0, 693, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 2); __PYX_ERR(0, 693, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_zipinfo)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 3); __PYX_ERR(0, 693, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pwd); 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_close_fileobj); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 693, __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); 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_self = values[0]; __pyx_v_fileobj = values[1]; __pyx_v_mode = values[2]; __pyx_v_zipinfo = values[3]; __pyx_v_pwd = values[4]; __pyx_v_close_fileobj = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 693, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipExtFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile___init__(__pyx_self, __pyx_v_self, __pyx_v_fileobj, __pyx_v_mode, __pyx_v_zipinfo, __pyx_v_pwd, __pyx_v_close_fileobj); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fileobj, CYTHON_UNUSED PyObject *__pyx_v_mode, PyObject *__pyx_v_zipinfo, PyObject *__pyx_v_pwd, PyObject *__pyx_v_close_fileobj) { PyObject *__pyx_v_check_byte = NULL; PyObject *__pyx_v_h = 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; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fileobj_2, __pyx_v_fileobj) < 0) __PYX_ERR(0, 694, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pwd_2, __pyx_v_pwd) < 0) __PYX_ERR(0, 695, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_close_fileobj_2, __pyx_v_close_fileobj) < 0) __PYX_ERR(0, 696, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_compress_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compress_type_2, __pyx_t_1) < 0) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_compress_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compress_left, __pyx_t_1) < 0) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_file_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_left, __pyx_t_1) < 0) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_decompressor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_1)) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_decompressor, __pyx_t_1) < 0) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_eof_2, Py_False) < 0) __PYX_ERR(0, 704, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer, __pyx_kp_b_) < 0) __PYX_ERR(0, 705, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_int_0) < 0) __PYX_ERR(0, 706, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_newlines, Py_None) < 0) __PYX_ERR(0, 708, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_t_1) < 0) __PYX_ERR(0, 710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_HasAttr(__pyx_v_zipinfo, __pyx_n_u_CRC); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 712, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_CRC); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_expected_crc, __pyx_t_1) < 0) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_crc32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_b_) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_b_); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_running_crc, __pyx_t_1) < 0) __PYX_ERR(0, 714, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_expected_crc, Py_None) < 0) __PYX_ERR(0, 716, __pyx_L1_error) } __pyx_L3:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_seekable_2, Py_False) < 0) __PYX_ERR(0, 718, __pyx_L1_error) { __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); { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fileobj, __pyx_n_s_seekable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L4_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_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(0, 720, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 720, __pyx_L4_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fileobj, __pyx_n_s_tell); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L4_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_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(0, 721, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_orig_compress_start, __pyx_t_1) < 0) __PYX_ERR(0, 721, __pyx_L4_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_compress_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_orig_compress_size, __pyx_t_1) < 0) __PYX_ERR(0, 722, __pyx_L4_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_file_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_orig_file_size, __pyx_t_1) < 0) __PYX_ERR(0, 723, __pyx_L4_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_running_crc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_orig_start_crc, __pyx_t_1) < 0) __PYX_ERR(0, 724, __pyx_L4_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_seekable_2, Py_True) < 0) __PYX_ERR(0, 725, __pyx_L4_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_L9_try_end; __pyx_L4_error:; __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; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_10) { __Pyx_ErrRestore(0,0,0); goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; __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_L5_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_L9_try_end:; } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_decrypter_2, Py_None) < 0) __PYX_ERR(0, 729, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_pwd); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 730, __pyx_L1_error) if (__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_flag_bits); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AndObjC(__pyx_t_1, __pyx_int_8, 0x8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 731, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_raw_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_RshiftObjC(__pyx_t_2, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_AndObjC(__pyx_t_1, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_check_byte = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L12; } { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_CRC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_RshiftObjC(__pyx_t_2, __pyx_int_24, 24, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_AndObjC(__pyx_t_1, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_check_byte = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L12:; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_init_decrypter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_h = __pyx_t_2; __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_h, __pyx_v_check_byte, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 738, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_6)) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_zipinfo, __pyx_n_s_orig_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Bad_password_for_file_r, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __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_RuntimeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 739, __pyx_L1_error) } } __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("turbozipfile.ZipExtFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_check_byte); __Pyx_XDECREF(__pyx_v_h); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_3_init_decrypter(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_3_init_decrypter = {"_init_decrypter", (PyCFunction)__pyx_pw_12turbozipfile_10ZipExtFile_3_init_decrypter, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_3_init_decrypter(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_init_decrypter (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_2_init_decrypter(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_2_init_decrypter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_header = 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_decrypter", 0); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ZipDecrypter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pwd_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_1)) __PYX_ERR(0, 742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_decrypter_2, __pyx_t_1) < 0) __PYX_ERR(0, 742, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fileobj_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __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 && likely(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_int_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_12); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_header = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_12, 12, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compress_left, __pyx_t_3) < 0) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decrypter_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_header) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_header); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; 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("turbozipfile.ZipExtFile._init_decrypter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_header); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_12turbozipfile_10ZipExtFile_5__repr__, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_UCS4 __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; __Pyx_INCREF(__pyx_kp_u__10); __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__10); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__10); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_module); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u__29); __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__29); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__29); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_qualname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = ((!__pyx_t_6) != 0); if (__pyx_t_7) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_name_r, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 757, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ZIP_STORED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_compressor_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_11 = 0; if (CYTHON_UNPACK_METHODS && unlikely(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_11 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_t_9}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_1, __pyx_t_9}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 761, __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_1); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_9); __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_compress_type_s, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } goto __pyx_L3; } { __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_kp_u_closed_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 763, __pyx_L1_error) } __pyx_L3:; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_kp_u__11); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyUnicode_Join(__pyx_kp_u_, __pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; 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_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("turbozipfile.ZipExtFile.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_7readline(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_10ZipExtFile_6readline[] = "Read and return a line from the stream.\n\n If limit is specified, at most limit bytes will be read.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_7readline = {"readline", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_10ZipExtFile_7readline, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_10ZipExtFile_6readline}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_7readline(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_limit = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("readline (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_limit,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject *)__pyx_int_neg_1)); 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_self)) != 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_limit); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "readline") < 0)) __PYX_ERR(0, 767, __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_self = values[0]; __pyx_v_limit = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("readline", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 767, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipExtFile.readline", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_6readline(__pyx_self, __pyx_v_self, __pyx_v_limit); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_6readline(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_limit) { PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_line = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("readline", 0); __pyx_t_1 = PyObject_RichCompare(__pyx_v_limit, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 773, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_find); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 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_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b__30, __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(0, 775, __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; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b__30, __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(0, 775, __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; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __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_kp_b__30); __Pyx_GIVEREF(__pyx_kp_b__30); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_b__30); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __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_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_i = __pyx_t_4; __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 776, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 0, &__pyx_t_1, &__pyx_v_i, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_line = __pyx_t_7; __pyx_t_7 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_v_i) < 0) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_line); __pyx_r = __pyx_v_line; goto __pyx_L0; } } __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_io); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BufferedIOBase); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_readline); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_self, __pyx_v_limit}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_self, __pyx_v_limit}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 781, __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); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_self); __Pyx_INCREF(__pyx_v_limit); __Pyx_GIVEREF(__pyx_v_limit); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_limit); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("turbozipfile.ZipExtFile.readline", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_line); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_9peek(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_10ZipExtFile_8peek[] = "Returns buffered bytes without advancing the position."; static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_9peek = {"peek", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_10ZipExtFile_9peek, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_10ZipExtFile_8peek}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_9peek(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_n = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("peek (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_n,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject *)__pyx_int_1)); 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_self)) != 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_n); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "peek") < 0)) __PYX_ERR(0, 783, __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_self = values[0]; __pyx_v_n = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("peek", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 783, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipExtFile.peek", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_8peek(__pyx_self, __pyx_v_self, __pyx_v_n); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_8peek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_v_chunk = NULL; PyObject *__pyx_r = NULL; __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; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("peek", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 785, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_v_n, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 785, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 785, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_n); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_chunk = __pyx_t_3; __pyx_t_3 = 0; __pyx_t_2 = PyObject_Length(__pyx_v_chunk); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 787, __pyx_L1_error) __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, &__pyx_t_4, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_v_chunk, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer, __pyx_t_4) < 0) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_int_0) < 0) __PYX_ERR(0, 789, __pyx_L1_error) goto __pyx_L4; } { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_Length(__pyx_v_chunk); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 791, __pyx_L1_error) __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_t_1) < 0) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; } __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_512, 0x200, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, &__pyx_t_3, &__pyx_t_6, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("turbozipfile.ZipExtFile.peek", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_chunk); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_11readable(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_11readable = {"readable", (PyCFunction)__pyx_pw_12turbozipfile_10ZipExtFile_11readable, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_11readable(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("readable (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_10readable(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_10readable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("readable", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __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(0, 797, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __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, 798, __pyx_L1_error) } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("turbozipfile.ZipExtFile.readable", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_13read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_10ZipExtFile_12read[] = "Read and return up to n bytes.\n\n If the argument is omitted, None, or negative, data is read and returned\n until EOF is reached.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_13read = {"read", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_10ZipExtFile_13read, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_10ZipExtFile_12read}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_13read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_n = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_n,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject *)__pyx_int_neg_1)); 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_self)) != 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_n); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 801, __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_self = values[0]; __pyx_v_n = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("read", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 801, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipExtFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_12read(__pyx_self, __pyx_v_self, __pyx_v_n); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_12read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_v_buf = NULL; PyObject *__pyx_v_end = NULL; PyObject *__pyx_v_data = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; 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; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 0); __Pyx_INCREF(__pyx_v_n); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __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(0, 807, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __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, 808, __pyx_L1_error) } __pyx_t_3 = (__pyx_v_n == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } __pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 809, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, &__pyx_t_5, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_buf = __pyx_t_6; __pyx_t_6 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer, __pyx_kp_b_) < 0) __PYX_ERR(0, 811, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_int_0) < 0) __PYX_ERR(0, 812, __pyx_L1_error) while (1) { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eof_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = ((!__pyx_t_2) != 0); if (!__pyx_t_4) break; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MAX_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __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_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_5); __pyx_t_5 = 0; } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyNumber_Add(__pyx_v_n, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_end = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 818, __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, 818, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyObject_RichCompare(__pyx_v_end, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 818, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 818, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 0, &__pyx_t_6, &__pyx_v_end, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_buf = __pyx_t_1; __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_v_end) < 0) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 823, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyNumber_Subtract(__pyx_v_end, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, 0, &__pyx_t_1, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_buf = __pyx_t_5; __pyx_t_5 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer, __pyx_kp_b_) < 0) __PYX_ERR(0, 825, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_int_0) < 0) __PYX_ERR(0, 826, __pyx_L1_error) while (1) { __pyx_t_5 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { } else { __pyx_t_4 = __pyx_t_2; goto __pyx_L12_bool_binop_done; } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eof_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); __pyx_t_4 = __pyx_t_3; __pyx_L12_bool_binop_done:; if (!__pyx_t_4) break; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; 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_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_n); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 829, __pyx_L1_error) __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer, __pyx_v_data) < 0) __PYX_ERR(0, 830, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_v_n) < 0) __PYX_ERR(0, 831, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_n, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11_break; } __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 835, __pyx_L1_error) __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_n, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L11_break:; __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("turbozipfile.ZipExtFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XDECREF(__pyx_v_end); __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_15_update_crc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_15_update_crc = {"_update_crc", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_10ZipExtFile_15_update_crc, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_15_update_crc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_newdata = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_update_crc (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_newdata,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_self)) != 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_newdata)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_update_crc", 1, 2, 2, 1); __PYX_ERR(0, 838, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_update_crc") < 0)) __PYX_ERR(0, 838, __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_self = values[0]; __pyx_v_newdata = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_update_crc", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 838, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipExtFile._update_crc", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_14_update_crc(__pyx_self, __pyx_v_self, __pyx_v_newdata); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_14_update_crc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_newdata) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_update_crc", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_expected_crc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_crc32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_running_crc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(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[3] = {__pyx_t_6, __pyx_v_newdata, __pyx_t_5}; __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(0, 843, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __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[3] = {__pyx_t_6, __pyx_v_newdata, __pyx_t_5}; __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(0, 843, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __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_newdata); __Pyx_GIVEREF(__pyx_v_newdata); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_newdata); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __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; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_running_crc, __pyx_t_1) < 0) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eof_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __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(0, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_running_crc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_expected_crc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_3)) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Bad_CRC_32_for_file_r, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_8 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 846, __pyx_L1_error) } __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_AddTraceback("turbozipfile.ZipExtFile._update_crc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_17read1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_10ZipExtFile_16read1[] = "Read up to n bytes with at most one read() system call."; static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_17read1 = {"read1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_10ZipExtFile_17read1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_10ZipExtFile_16read1}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_17read1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_n = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read1 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_n,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_self)) != 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_n)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("read1", 1, 2, 2, 1); __PYX_ERR(0, 848, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read1") < 0)) __PYX_ERR(0, 848, __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_self = values[0]; __pyx_v_n = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("read1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 848, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipExtFile.read1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_16read1(__pyx_self, __pyx_v_self, __pyx_v_n); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_16read1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_v_buf = NULL; PyObject *__pyx_v_data = NULL; PyObject *__pyx_v_end = 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; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read1", 0); __Pyx_INCREF(__pyx_v_n); __pyx_t_2 = (__pyx_v_n == Py_None); __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_4 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 851, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 0, &__pyx_t_5, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_buf = __pyx_t_6; __pyx_t_6 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer, __pyx_kp_b_) < 0) __PYX_ERR(0, 853, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_int_0) < 0) __PYX_ERR(0, 854, __pyx_L1_error) while (1) { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eof_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __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, 855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = ((!__pyx_t_1) != 0); if (!__pyx_t_3) break; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MAX_N); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_data); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 857, __pyx_L1_error) if (__pyx_t_3) { __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_break; } } __pyx_L7_break:; __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyNumber_Add(__pyx_v_n, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_end = __pyx_t_5; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_RichCompare(__pyx_v_end, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, 0, &__pyx_t_5, &__pyx_v_end, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_buf = __pyx_t_4; __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_v_end) < 0) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyNumber_Subtract(__pyx_v_end, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 0, &__pyx_t_4, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 869, __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_v_buf = __pyx_t_6; __pyx_t_6 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer, __pyx_kp_b_) < 0) __PYX_ERR(0, 870, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_int_0) < 0) __PYX_ERR(0, 871, __pyx_L1_error) __pyx_t_6 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 872, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { while (1) { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eof_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = ((!__pyx_t_3) != 0); if (!__pyx_t_1) break; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __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_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_n); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 875, __pyx_L1_error) __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_RichCompare(__pyx_v_n, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer, __pyx_v_data) < 0) __PYX_ERR(0, 876, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_v_n) < 0) __PYX_ERR(0, 877, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_n, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L12_break; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_data); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 880, __pyx_L1_error) if (__pyx_t_1) { __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L12_break; } } __pyx_L12_break:; } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; 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_7); __Pyx_AddTraceback("turbozipfile.ZipExtFile.read1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_end); __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_19_read1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_19_read1 = {"_read1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_10ZipExtFile_19_read1, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_19_read1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_n = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_read1 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_n,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_self)) != 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_n)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_read1", 1, 2, 2, 1); __PYX_ERR(0, 885, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_read1") < 0)) __PYX_ERR(0, 885, __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_self = values[0]; __pyx_v_n = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_read1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 885, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipExtFile._read1", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_18_read1(__pyx_self, __pyx_v_self, __pyx_v_n); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_18_read1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_v_data = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read1", 0); __Pyx_INCREF(__pyx_v_n); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eof_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_b_); __pyx_r = __pyx_kp_b_; goto __pyx_L0; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ZIP_DEFLATED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decompressor); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_unconsumed_tail); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_data = __pyx_t_4; __pyx_t_4 = 0; __pyx_t_6 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 895, __pyx_L1_error) __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_v_n, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 896, __pyx_L1_error) __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyNumber_Subtract(__pyx_v_n, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__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_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_data, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); __pyx_t_4 = 0; } goto __pyx_L6; } { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 898, __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_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_n); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_data = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L6:; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ZIP_STORED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_left); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_eof_2, __pyx_t_5) < 0) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L8; } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ZIP_DEFLATED); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 902, __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_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MIN_READ_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_n); __pyx_t_7 = __pyx_v_n; __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; } else { __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = __pyx_t_7; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decompressor); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decompress); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(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_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_data, __pyx_v_n}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_data, __pyx_v_n}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_2 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_8, __pyx_v_data); __Pyx_INCREF(__pyx_v_n); __Pyx_GIVEREF(__pyx_v_n); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_8, __pyx_v_n); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decompressor); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_eof); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 906, __pyx_L1_error) if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_left); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 907, __pyx_L1_error) if (__pyx_t_1) { __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = __pyx_t_7; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9_bool_binop_done; } __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decompressor); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_unconsumed_tail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = (!__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; __pyx_t_2 = 0; __pyx_L9_bool_binop_done:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_eof_2, __pyx_t_4) < 0) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eof_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decompressor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_flush); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_data, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7); __pyx_t_7 = 0; } goto __pyx_L8; } { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decompressor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decompress); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __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_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decompressor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_eof); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 912, __pyx_L1_error) if (!__pyx_t_3) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L13_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_left); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_L13_bool_binop_done:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_eof_2, __pyx_t_7) < 0) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L8:; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_left); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_t_7, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_left); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 915, __pyx_L1_error) __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_left, __pyx_t_4) < 0) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_left); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 916, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 916, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_3) { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_eof_2, Py_True) < 0) __PYX_ERR(0, 917, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_crc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_data); __pyx_r = __pyx_v_data; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("turbozipfile.ZipExtFile._read1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_21_read2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_21_read2 = {"_read2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_10ZipExtFile_21_read2, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_21_read2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_n = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_read2 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_n,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_self)) != 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_n)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_read2", 1, 2, 2, 1); __PYX_ERR(0, 921, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_read2") < 0)) __PYX_ERR(0, 921, __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_self = values[0]; __pyx_v_n = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_read2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 921, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipExtFile._read2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_20_read2(__pyx_self, __pyx_v_self, __pyx_v_n); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_20_read2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) { PyObject *__pyx_v_data = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read2", 0); __Pyx_INCREF(__pyx_v_n); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __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(0, 922, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_b_); __pyx_r = __pyx_kp_b_; goto __pyx_L0; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MIN_READ_SIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_n); __pyx_t_1 = __pyx_v_n; __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 925, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_left); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_n); __pyx_t_4 = __pyx_v_n; __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 926, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 926, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; } else { __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fileobj_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_v_n) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_n); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_data = __pyx_t_2; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_left); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 929, __pyx_L1_error) __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compress_left, __pyx_t_1) < 0) __PYX_ERR(0, 929, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_data); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 930, __pyx_L1_error) __pyx_t_7 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_7)) { __Pyx_Raise(__pyx_builtin_EOFError, 0, 0, 0); __PYX_ERR(0, 931, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decrypter_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decrypter_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_data); __pyx_r = __pyx_v_data; 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); __Pyx_AddTraceback("turbozipfile.ZipExtFile._read2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_n); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_23close(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_23close = {"close", (PyCFunction)__pyx_pw_12turbozipfile_10ZipExtFile_23close, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_23close(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_22close(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_22close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; char const *__pyx_t_7; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("close", 0); { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close_fileobj_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 939, __pyx_L4_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fileobj_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 940, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 940, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L4_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_t_4 = __Pyx_CyFunction_GetClassObj(__pyx_self); if (!__pyx_t_4) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 942, __pyx_L1_error) } __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __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_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __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; goto __pyx_L5; } __pyx_L4_error:; { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __pyx_t_5 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename; { __pyx_t_3 = __Pyx_CyFunction_GetClassObj(__pyx_self); if (!__pyx_t_3) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 942, __pyx_L8_error) } __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; goto __pyx_L1_error; __pyx_L8_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; goto __pyx_L1_error; } __pyx_L5:; } __pyx_r = 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_4); __Pyx_AddTraceback("turbozipfile.ZipExtFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_25seekable(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_25seekable = {"seekable", (PyCFunction)__pyx_pw_12turbozipfile_10ZipExtFile_25seekable, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_25seekable(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("seekable (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_24seekable(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_24seekable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("seekable", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __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(0, 945, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __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, 946, __pyx_L1_error) } __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seekable_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("turbozipfile.ZipExtFile.seekable", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_27seek(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_27seek = {"seek", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_10ZipExtFile_27seek, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_27seek(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_offset = 0; PyObject *__pyx_v_whence = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("seek (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_offset,&__pyx_n_s_whence,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)((PyObject *)__pyx_int_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_self)) != 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_offset)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("seek", 0, 2, 3, 1); __PYX_ERR(0, 949, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_whence); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) __PYX_ERR(0, 949, __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_self = values[0]; __pyx_v_offset = values[1]; __pyx_v_whence = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("seek", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 949, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipExtFile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_26seek(__pyx_self, __pyx_v_self, __pyx_v_offset, __pyx_v_whence); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_26seek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_whence) { PyObject *__pyx_v_curr_pos = NULL; PyObject *__pyx_v_new_pos = NULL; PyObject *__pyx_v_read_offset = NULL; PyObject *__pyx_v_buff_offset = NULL; PyObject *__pyx_v_read_len = 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; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("seek", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __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(0, 950, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __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, 951, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seekable_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __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(0, 952, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (unlikely(__pyx_t_3)) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_io); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_UnsupportedOperation); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_u_underlying_stream_is_not_seekabl) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u_underlying_stream_is_not_seekabl); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 953, __pyx_L1_error) } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tell); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; 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_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_curr_pos = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_whence, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_v_offset); __pyx_v_new_pos = __pyx_v_offset; goto __pyx_L5; } __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_whence, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 957, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { __pyx_t_1 = PyNumber_Add(__pyx_v_curr_pos, __pyx_v_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_pos = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L5; } __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_whence, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 959, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(__pyx_t_3)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orig_file_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_v_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_new_pos = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L5; } { __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __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, 962, __pyx_L1_error) } __pyx_L5:; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orig_file_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_RichCompare(__pyx_v_new_pos, __pyx_t_5, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orig_file_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_new_pos, __pyx_t_1); __pyx_t_1 = 0; } __pyx_t_1 = PyObject_RichCompare(__pyx_v_new_pos, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_new_pos, __pyx_int_0); } __pyx_t_1 = PyNumber_Subtract(__pyx_v_new_pos, __pyx_v_curr_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_read_offset = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyNumber_Add(__pyx_v_read_offset, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_buff_offset = __pyx_t_5; __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_v_buff_offset, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 974, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 974, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L9_bool_binop_done; } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 974, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_RichCompare(__pyx_v_buff_offset, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 974, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_2; __pyx_L9_bool_binop_done:; if (__pyx_t_3) { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_v_buff_offset) < 0) __PYX_ERR(0, 976, __pyx_L1_error) __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_read_offset, __pyx_int_0); goto __pyx_L8; } __pyx_t_1 = PyObject_RichCompare(__pyx_v_read_offset, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fileobj_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_seek); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orig_compress_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __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_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orig_start_crc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_running_crc, __pyx_t_1) < 0) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orig_compress_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compress_left, __pyx_t_1) < 0) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orig_file_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_left, __pyx_t_1) < 0) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer, __pyx_kp_b_) < 0) __PYX_ERR(0, 984, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset_2, __pyx_int_0) < 0) __PYX_ERR(0, 985, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_decompressor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compress_type_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_decompressor, __pyx_t_1) < 0) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_eof_2, Py_False) < 0) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_INCREF(__pyx_v_new_pos); __Pyx_DECREF_SET(__pyx_v_read_offset, __pyx_v_new_pos); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decrypter_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_init_decrypter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 990, __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_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __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_L8:; while (1) { __pyx_t_1 = PyObject_RichCompare(__pyx_v_read_offset, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 992, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) break; __Pyx_INCREF(__pyx_v_read_offset); __pyx_t_1 = __pyx_v_read_offset; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MAX_SEEK_READ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 993, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 993, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_2) { __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; } else { __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_read_len, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; 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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_read_len) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_read_len); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __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; __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_read_offset, __pyx_v_read_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_read_offset, __pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tell); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; 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_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; 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_7); __Pyx_AddTraceback("turbozipfile.ZipExtFile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_curr_pos); __Pyx_XDECREF(__pyx_v_new_pos); __Pyx_XDECREF(__pyx_v_read_offset); __Pyx_XDECREF(__pyx_v_buff_offset); __Pyx_XDECREF(__pyx_v_read_len); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_29tell(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_10ZipExtFile_29tell = {"tell", (PyCFunction)__pyx_pw_12turbozipfile_10ZipExtFile_29tell, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_10ZipExtFile_29tell(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tell (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_10ZipExtFile_28tell(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10ZipExtFile_28tell(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_filepos = 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; Py_ssize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tell", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __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(0, 1000, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __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, 1001, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seekable_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __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(0, 1002, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (unlikely(__pyx_t_3)) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_io); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_UnsupportedOperation); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_u_underlying_stream_is_not_seekabl) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u_underlying_stream_is_not_seekabl); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 1003, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orig_file_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_left); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readbuffer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __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_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_filepos = __pyx_t_4; __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_filepos); __pyx_r = __pyx_v_filepos; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("turbozipfile.ZipExtFile.tell", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_filepos); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_29__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject*)__pyx_n_u_r)); __Pyx_GIVEREF(((PyObject*)__pyx_n_u_r)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)__pyx_n_u_r)); __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_compression); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_compression); PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_compression); __Pyx_INCREF(((PyObject *)Py_True)); __Pyx_GIVEREF(((PyObject *)Py_True)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_True)); __Pyx_INCREF(((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None)); __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_strict_timestamps, ((PyObject *)Py_True)) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1034, __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; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_7ZipFile___init__[] = "Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',\n\n or append 'a'.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_7ZipFile___init__}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_file = 0; PyObject *__pyx_v_mode = 0; PyObject *__pyx_v_compression = 0; PyObject *__pyx_v_allowZip64 = 0; PyObject *__pyx_v_compresslevel = 0; PyObject *__pyx_v_strict_timestamps = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_file,&__pyx_n_s_mode,&__pyx_n_s_compression,&__pyx_n_s_allowZip64,&__pyx_n_s_compresslevel_2,&__pyx_n_s_strict_timestamps,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self); values[2] = ((PyObject *)((PyObject*)__pyx_n_u_r)); values[3] = __pyx_dynamic_args->__pyx_arg_compression; values[4] = ((PyObject *)((PyObject *)Py_True)); values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_True)); 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_self)) != 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_file)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 6, 1); __PYX_ERR(0, 1034, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode); 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_compression); 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_allowZip64); 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_compresslevel_2); if (value) { values[5] = value; kw_args--; } } } if (kw_args == 1) { const Py_ssize_t index = 6; PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1034, __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); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_file = values[1]; __pyx_v_mode = values[2]; __pyx_v_compression = values[3]; __pyx_v_allowZip64 = values[4]; __pyx_v_compresslevel = values[5]; __pyx_v_strict_timestamps = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1034, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile___init__(__pyx_self, __pyx_v_self, __pyx_v_file, __pyx_v_mode, __pyx_v_compression, __pyx_v_allowZip64, __pyx_v_compresslevel, __pyx_v_strict_timestamps); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_mode, PyObject *__pyx_v_compression, PyObject *__pyx_v_allowZip64, PyObject *__pyx_v_compresslevel, PyObject *__pyx_v_strict_timestamps) { PyObject *__pyx_v_modeDict = NULL; PyObject *__pyx_v_filemode = NULL; PyObject *__pyx_v_fp = 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; int __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; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_file); __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_r, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1046, __pyx_L1_error) if (unlikely(__pyx_t_1)) { __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1047, __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(0, 1047, __pyx_L1_error) } __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_check_compression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __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_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_compression) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_compression); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __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; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_allowZip64_2, __pyx_v_allowZip64) < 0) __PYX_ERR(0, 1051, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_debug, __pyx_int_0) < 0) __PYX_ERR(0, 1052, __pyx_L1_error) __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_NameToInfo, __pyx_t_2) < 0) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filelist, __pyx_t_2) < 0) __PYX_ERR(0, 1054, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compression, __pyx_v_compression) < 0) __PYX_ERR(0, 1055, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compresslevel_2, __pyx_v_compresslevel) < 0) __PYX_ERR(0, 1056, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pwd, Py_None) < 0) __PYX_ERR(0, 1057, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comment_2, __pyx_kp_b_) < 0) __PYX_ERR(0, 1058, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strict_timestamps_2, __pyx_v_strict_timestamps) < 0) __PYX_ERR(0, 1059, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PathLike); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = PyObject_IsInstance(__pyx_v_file, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fspath); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_file) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_file); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_file, __pyx_t_3); __pyx_t_3 = 0; } __pyx_t_5 = PyUnicode_Check(__pyx_v_file); __pyx_t_1 = (__pyx_t_5 != 0); if (__pyx_t_1) { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filePassed, __pyx_int_0) < 0) __PYX_ERR(0, 1066, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filename, __pyx_v_file) < 0) __PYX_ERR(0, 1067, __pyx_L1_error) __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_r, __pyx_n_u_rb) < 0) __PYX_ERR(0, 1069, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_w, __pyx_kp_u_w_b) < 0) __PYX_ERR(0, 1069, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_x, __pyx_kp_u_x_b) < 0) __PYX_ERR(0, 1069, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_a, __pyx_kp_u_r_b) < 0) __PYX_ERR(0, 1069, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_r_b, __pyx_kp_u_w_b) < 0) __PYX_ERR(0, 1069, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_w_b, __pyx_n_u_wb) < 0) __PYX_ERR(0, 1069, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_x_b, __pyx_n_u_xb) < 0) __PYX_ERR(0, 1069, __pyx_L1_error) __pyx_v_modeDict = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_modeDict, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_filemode = __pyx_t_3; __pyx_t_3 = 0; while (1) { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__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_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_io); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1080, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(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_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_file, __pyx_v_filemode}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1080, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_file, __pyx_v_filemode}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1080, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1080, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_file); __Pyx_GIVEREF(__pyx_v_file); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_file); __Pyx_INCREF(__pyx_v_filemode); __Pyx_GIVEREF(__pyx_v_filemode); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_filemode); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1080, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fp, __pyx_t_3) < 0) __PYX_ERR(0, 1080, __pyx_L8_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __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; __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_9) { __Pyx_AddTraceback("turbozipfile.ZipFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_10) < 0) __PYX_ERR(0, 1081, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_filemode, __pyx_v_modeDict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1082, __pyx_L10_except_error) __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_modeDict, __pyx_v_filemode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_filemode, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L17_except_continue; } __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_10); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_10 = 0; __PYX_ERR(0, 1085, __pyx_L10_except_error) __pyx_L17_except_continue:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L14_try_continue; } goto __pyx_L10_except_error; __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L14_try_continue:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L6_continue; __pyx_L15_try_end:; } goto __pyx_L7_break; __pyx_L6_continue:; } __pyx_L7_break:; goto __pyx_L5; } { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filePassed, __pyx_int_1) < 0) __PYX_ERR(0, 1088, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fp, __pyx_v_file) < 0) __PYX_ERR(0, 1089, __pyx_L1_error) __pyx_t_10 = __Pyx_GetAttr3(__pyx_v_file, __pyx_n_u_name_2, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filename, __pyx_t_10) < 0) __PYX_ERR(0, 1090, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_L5:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fileRefCnt, __pyx_int_1) < 0) __PYX_ERR(0, 1091, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RLock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __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_10 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock_2, __pyx_t_10) < 0) __PYX_ERR(0, 1092, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_seekable_2, Py_True) < 0) __PYX_ERR(0, 1093, __pyx_L1_error) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_RealGetContents); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_10 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1096, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L24_try_end; __pyx_L19_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __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; { __Pyx_AddTraceback("turbozipfile.ZipFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 1097, __pyx_L21_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L21_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_fp = __pyx_t_4; __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fp, Py_None) < 0) __PYX_ERR(0, 1099, __pyx_L21_except_error) __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fpclose); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1100, __pyx_L21_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } __pyx_t_4 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_v_fp) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_fp); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L21_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_10, __pyx_t_3, __pyx_t_2); __pyx_t_10 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 1101, __pyx_L21_except_error) } __pyx_L21_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6); goto __pyx_L1_error; __pyx_L24_try_end:; } __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_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("turbozipfile.ZipFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_modeDict); __Pyx_XDECREF(__pyx_v_filemode); __Pyx_XDECREF(__pyx_v_fp); __Pyx_XDECREF(__pyx_v_file); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_3__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_3__enter__ = {"__enter__", (PyCFunction)__pyx_pw_12turbozipfile_7ZipFile_3__enter__, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_3__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_2__enter__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_2__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_5__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_5__exit__ = {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_5__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_type = 0; CYTHON_UNUSED PyObject *__pyx_v_value = 0; CYTHON_UNUSED PyObject *__pyx_v_traceback = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0}; PyObject* values[4] = {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 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_self)) != 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_type)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, 1); __PYX_ERR(0, 1106, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, 2); __PYX_ERR(0, 1106, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, 3); __PYX_ERR(0, 1106, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) __PYX_ERR(0, 1106, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { 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); } __pyx_v_self = values[0]; __pyx_v_type = values[1]; __pyx_v_value = values[2]; __pyx_v_traceback = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1106, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_4__exit__(__pyx_self, __pyx_v_self, __pyx_v_type, __pyx_v_value, __pyx_v_traceback); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_4__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __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_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(0, 1107, __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; __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("turbozipfile.ZipFile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_7__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_7__repr__ = {"__repr__", (PyCFunction)__pyx_pw_12turbozipfile_7ZipFile_7__repr__, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_7__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_6__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_UCS4 __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; __Pyx_INCREF(__pyx_kp_u__10); __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__10); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__10); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_module); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u__29); __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__29); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__29); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_qualname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filePassed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_file_r, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = (__pyx_t_4 != Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_7 != 0); if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_filename_r, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; goto __pyx_L3; } { __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_kp_u_closed_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1119, __pyx_L1_error) } __pyx_L3:; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_kp_u__11); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyUnicode_Join(__pyx_kp_u_, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("turbozipfile.ZipFile.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_9_RealGetContents(PyObject *__pyx_self, PyObject *__pyx_v_self); static char __pyx_doc_12turbozipfile_7ZipFile_8_RealGetContents[] = "Read in the table of contents for the ZIP file."; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_9_RealGetContents = {"_RealGetContents", (PyCFunction)__pyx_pw_12turbozipfile_7ZipFile_9_RealGetContents, METH_O, __pyx_doc_12turbozipfile_7ZipFile_8_RealGetContents}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_9_RealGetContents(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_RealGetContents (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_8_RealGetContents(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_8_RealGetContents(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_fp = NULL; PyObject *__pyx_v_endrec = NULL; PyObject *__pyx_v_size_cd = NULL; PyObject *__pyx_v_offset_cd = NULL; PyObject *__pyx_v_concat = NULL; PyObject *__pyx_v_inferred = NULL; PyObject *__pyx_v_data = NULL; PyObject *__pyx_v_total = NULL; PyObject *__pyx_v_centdir = NULL; PyObject *__pyx_v_filename = NULL; CYTHON_UNUSED PyObject *__pyx_v_flags = NULL; PyObject *__pyx_v_orig_filename = NULL; PyObject *__pyx_v_null_byte = NULL; PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_t = NULL; PyObject *__pyx_v_d = 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; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *(*__pyx_t_21)(PyObject *); int __pyx_t_22; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_RealGetContents", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_fp = __pyx_t_1; __pyx_t_1 = 0; { __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); { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_EndRecData); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1127, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __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_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_fp) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_fp); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_endrec = __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; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_7) { __Pyx_AddTraceback("turbozipfile.ZipFile._RealGetContents", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1128, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1129, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __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_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_kp_u_File_is_not_a_zip_file) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_u_File_is_not_a_zip_file); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1129, __pyx_L5_except_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, 1129, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_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_L8_try_end:; } __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_endrec); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1130, __pyx_L1_error) __pyx_t_12 = ((!__pyx_t_11) != 0); if (unlikely(__pyx_t_12)) { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_kp_u_File_is_not_a_zip_file) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u_File_is_not_a_zip_file); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1131, __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, 1131, __pyx_L1_error) } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_debug); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_endrec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ECD_SIZE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_endrec, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_size_cd = __pyx_t_6; __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ECD_OFFSET); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_endrec, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_offset_cd = __pyx_t_5; __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ECD_COMMENT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_endrec, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comment_2, __pyx_t_6) < 0) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ECD_LOCATION); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_endrec, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Subtract(__pyx_t_5, __pyx_v_size_cd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Subtract(__pyx_t_6, __pyx_v_offset_cd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_concat = __pyx_t_5; __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ECD_SIGNATURE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_endrec, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_stringEndArchive64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_12) { __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sizeEndCentDir64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sizeEndCentDir64Locator); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_InPlaceSubtract(__pyx_v_concat, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_concat, __pyx_t_5); __pyx_t_5 = 0; } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { __pyx_t_6 = PyNumber_Add(__pyx_v_concat, __pyx_v_offset_cd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_inferred = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_kp_u_given_inferred_offset); __Pyx_GIVEREF(__pyx_kp_u_given_inferred_offset); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_given_inferred_offset); __Pyx_INCREF(__pyx_v_offset_cd); __Pyx_GIVEREF(__pyx_v_offset_cd); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_offset_cd); __Pyx_INCREF(__pyx_v_inferred); __Pyx_GIVEREF(__pyx_v_inferred); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_inferred); __Pyx_INCREF(__pyx_v_concat); __Pyx_GIVEREF(__pyx_v_concat); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_concat); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1146, __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; } __pyx_t_5 = PyNumber_Add(__pyx_v_offset_cd, __pyx_v_concat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_start_dir, __pyx_t_5) < 0) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fp, __pyx_n_s_seek); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = NULL; __pyx_t_7 = 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_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_1, __pyx_int_0}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __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_8, __pyx_t_1, __pyx_int_0}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1149, __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_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_t_1); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_int_0); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __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_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fp, __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1150, __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_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_v_size_cd) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_size_cd); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_data = __pyx_t_5; __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_io); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_BytesIO); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_6, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_data); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_fp, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_int_0); __pyx_v_total = __pyx_int_0; while (1) { __pyx_t_5 = PyObject_RichCompare(__pyx_v_total, __pyx_v_size_cd, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1153, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_12) break; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_fp, __pyx_n_s_read); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sizeCentralDir); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_centdir, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = PyObject_Length(__pyx_v_centdir); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1155, __pyx_L1_error) __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sizeCentralDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_9, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_t_12)) { __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __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_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_5, __pyx_kp_u_Truncated_central_directory) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_u_Truncated_central_directory); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1156, __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, 1156, __pyx_L1_error) } __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_struct); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_structCentralDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __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[3] = {__pyx_t_1, __pyx_t_9, __pyx_v_centdir}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_9, __pyx_v_centdir}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_v_centdir); __Pyx_GIVEREF(__pyx_v_centdir); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_centdir); __pyx_t_9 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_centdir, __pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CD_SIGNATURE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_centdir, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1158, __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_stringCentralDir); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__pyx_t_12)) { __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __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_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_kp_u_Bad_magic_number_for_central_dir) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_Bad_magic_number_for_central_dir); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 1159, __pyx_L1_error) } __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_debug); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_centdir); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_fp, __pyx_n_s_read); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CD_FILENAME_LENGTH); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_centdir, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_filename, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_centdir, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_flags, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_v_filename); __Pyx_XDECREF_SET(__pyx_v_orig_filename, __pyx_v_filename); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_find); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_int_0); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_null_byte, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_RichCompare(__pyx_v_null_byte, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1167, __pyx_L1_error) __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_filename, 0, 0, NULL, &__pyx_v_null_byte, NULL, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_6); __pyx_t_6 = 0; } { __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); { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1170, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1170, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_orig_filename, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1171, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1171, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_orig_filename, __pyx_t_6); __pyx_t_6 = 0; } __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_L28_try_end; __pyx_L21_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_7) { __Pyx_AddTraceback("turbozipfile.ZipFile._RealGetContents", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 1172, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_8, __pyx_t_9); __pyx_t_6 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __PYX_ERR(0, 1173, __pyx_L23_except_error) } goto __pyx_L23_except_error; __pyx_L23_except_error:; __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_L28_try_end:; } __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ZipInfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(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 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_filename, __pyx_v_orig_filename}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_filename, __pyx_v_orig_filename}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1177, __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_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_filename); __Pyx_INCREF(__pyx_v_orig_filename); __Pyx_GIVEREF(__pyx_v_orig_filename); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_orig_filename); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_fp, __pyx_n_s_read); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CD_EXTRA_FIELD_LENGTH); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_centdir, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_9 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __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_9)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_extra, __pyx_t_9) < 0) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_fp, __pyx_n_s_read); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CD_COMMENT_LENGTH); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_centdir, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1179, __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 && 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_9 = (__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_9)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_comment, __pyx_t_9) < 0) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_CD_LOCAL_HEADER_OFFSET); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_centdir, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_header_offset, __pyx_t_8) < 0) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_centdir, 1, 12, NULL, NULL, &__pyx_slice__37, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); 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 != 11)) { if (size > 11) __Pyx_RaiseTooManyValuesError(11); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 1181, __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_5 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 3); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 4); __pyx_t_14 = PyTuple_GET_ITEM(sequence, 5); __pyx_t_15 = PyTuple_GET_ITEM(sequence, 6); __pyx_t_16 = PyTuple_GET_ITEM(sequence, 7); __pyx_t_17 = PyTuple_GET_ITEM(sequence, 8); __pyx_t_18 = PyTuple_GET_ITEM(sequence, 9); __pyx_t_19 = PyTuple_GET_ITEM(sequence, 10); } else { __pyx_t_9 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); __pyx_t_6 = PyList_GET_ITEM(sequence, 2); __pyx_t_1 = PyList_GET_ITEM(sequence, 3); __pyx_t_10 = PyList_GET_ITEM(sequence, 4); __pyx_t_14 = PyList_GET_ITEM(sequence, 5); __pyx_t_15 = PyList_GET_ITEM(sequence, 6); __pyx_t_16 = PyList_GET_ITEM(sequence, 7); __pyx_t_17 = PyList_GET_ITEM(sequence, 8); __pyx_t_18 = PyList_GET_ITEM(sequence, 9); __pyx_t_19 = PyList_GET_ITEM(sequence, 10); } __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(__pyx_t_16); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_19); #else { Py_ssize_t i; PyObject** temps[11] = {&__pyx_t_9,&__pyx_t_5,&__pyx_t_6,&__pyx_t_1,&__pyx_t_10,&__pyx_t_14,&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19}; for (i=0; i < 11; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; PyObject** temps[11] = {&__pyx_t_9,&__pyx_t_5,&__pyx_t_6,&__pyx_t_1,&__pyx_t_10,&__pyx_t_14,&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19}; __pyx_t_20 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_21 = Py_TYPE(__pyx_t_20)->tp_iternext; for (index=0; index < 11; index++) { PyObject* item = __pyx_t_21(__pyx_t_20); if (unlikely(!item)) goto __pyx_L31_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_21(__pyx_t_20), 11) < 0) __PYX_ERR(0, 1181, __pyx_L1_error) __pyx_t_21 = NULL; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; goto __pyx_L32_unpacking_done; __pyx_L31_unpacking_failed:; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_21 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 1181, __pyx_L1_error) __pyx_L32_unpacking_done:; } if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_create_version, __pyx_t_9) < 0) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_create_system, __pyx_t_5) < 0) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_extract_version, __pyx_t_6) < 0) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_reserved, __pyx_t_1) < 0) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_flag_bits, __pyx_t_10) < 0) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_compress_type, __pyx_t_14) < 0) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_16); __pyx_t_16 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_CRC, __pyx_t_17) < 0) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_compress_size, __pyx_t_18) < 0) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_file_size, __pyx_t_19) < 0) __PYX_ERR(0, 1183, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_extract_version); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_MAX_EXTRACT_VERSION); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = PyObject_RichCompare(__pyx_t_8, __pyx_t_19, Py_GT); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (unlikely(__pyx_t_12)) { __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_extract_version); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_18, __pyx_int_10, 10, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_zip_file_version_1f, __pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_Raise(__pyx_t_19, 0, 0, 0); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __PYX_ERR(0, 1185, __pyx_L1_error) } __pyx_t_19 = __Pyx_PyObject_GetSlice(__pyx_v_centdir, 15, 18, NULL, NULL, &__pyx_slice__38, 1, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); if ((likely(PyTuple_CheckExact(__pyx_t_19))) || (PyList_CheckExact(__pyx_t_19))) { PyObject* sequence = __pyx_t_19; 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, 1187, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_18 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_17 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_18 = PyList_GET_ITEM(sequence, 0); __pyx_t_8 = PyList_GET_ITEM(sequence, 1); __pyx_t_17 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_17); #else __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_17 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); #endif __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } else { Py_ssize_t index = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_19); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_21 = Py_TYPE(__pyx_t_16)->tp_iternext; index = 0; __pyx_t_18 = __pyx_t_21(__pyx_t_16); if (unlikely(!__pyx_t_18)) goto __pyx_L34_unpacking_failed; __Pyx_GOTREF(__pyx_t_18); index = 1; __pyx_t_8 = __pyx_t_21(__pyx_t_16); if (unlikely(!__pyx_t_8)) goto __pyx_L34_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 2; __pyx_t_17 = __pyx_t_21(__pyx_t_16); if (unlikely(!__pyx_t_17)) goto __pyx_L34_unpacking_failed; __Pyx_GOTREF(__pyx_t_17); if (__Pyx_IternextUnpackEndCheck(__pyx_t_21(__pyx_t_16), 3) < 0) __PYX_ERR(0, 1187, __pyx_L1_error) __pyx_t_21 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L35_unpacking_done; __pyx_L34_unpacking_failed:; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_21 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 1187, __pyx_L1_error) __pyx_L35_unpacking_done:; } if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_volume, __pyx_t_18) < 0) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_internal_attr, __pyx_t_8) < 0) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_external_attr, __pyx_t_17) < 0) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_raw_time, __pyx_v_t) < 0) __PYX_ERR(0, 1189, __pyx_L1_error) __pyx_t_19 = __Pyx_PyInt_RshiftObjC(__pyx_v_d, __pyx_int_9, 9, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_17 = __Pyx_PyInt_AddObjC(__pyx_t_19, __pyx_int_1980, 0x7BC, 0, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = __Pyx_PyInt_RshiftObjC(__pyx_v_d, __pyx_int_5, 5, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_8 = __Pyx_PyInt_AndObjC(__pyx_t_19, __pyx_int_15, 0xF, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = __Pyx_PyInt_AndObjC(__pyx_v_d, __pyx_int_31, 0x1F, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = __Pyx_PyInt_RshiftObjC(__pyx_v_t, __pyx_int_11, 11, 0, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = __Pyx_PyInt_RshiftObjC(__pyx_v_t, __pyx_int_5, 5, 0, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = __Pyx_PyInt_AndObjC(__pyx_t_16, __pyx_int_63, 0x3F, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_PyInt_AndObjC(__pyx_v_t, __pyx_int_31, 0x1F, 0, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_14 = PyNumber_Multiply(__pyx_t_16, __pyx_int_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyTuple_New(6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_14); __pyx_t_17 = 0; __pyx_t_8 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_date_time, __pyx_t_16) < 0) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_decodeExtra); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); } } __pyx_t_16 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_header_offset); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_v_concat); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_x, __pyx_n_s_header_offset, __pyx_t_14) < 0) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filelist); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_22 = __Pyx_PyObject_Append(__pyx_t_14, __pyx_v_x); if (unlikely(__pyx_t_22 == ((int)-1))) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NameToInfo); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_filename); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_t_16, __pyx_v_x) < 0)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_sizeCentralDir); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_14 = PyNumber_Add(__pyx_v_total, __pyx_t_16); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_CD_FILENAME_LENGTH); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_v_centdir, __pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_CD_EXTRA_FIELD_LENGTH); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_centdir, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_CD_COMMENT_LENGTH); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_v_centdir, __pyx_t_14); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF_SET(__pyx_v_total, __pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_debug); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = PyObject_RichCompare(__pyx_t_14, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_12) { __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_n_u_total); __Pyx_GIVEREF(__pyx_n_u_total); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_n_u_total); __Pyx_INCREF(__pyx_v_total); __Pyx_GIVEREF(__pyx_v_total); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_total); __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_16, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __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_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); __Pyx_AddTraceback("turbozipfile.ZipFile._RealGetContents", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fp); __Pyx_XDECREF(__pyx_v_endrec); __Pyx_XDECREF(__pyx_v_size_cd); __Pyx_XDECREF(__pyx_v_offset_cd); __Pyx_XDECREF(__pyx_v_concat); __Pyx_XDECREF(__pyx_v_inferred); __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_total); __Pyx_XDECREF(__pyx_v_centdir); __Pyx_XDECREF(__pyx_v_filename); __Pyx_XDECREF(__pyx_v_flags); __Pyx_XDECREF(__pyx_v_orig_filename); __Pyx_XDECREF(__pyx_v_null_byte); __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_t); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_11namelist(PyObject *__pyx_self, PyObject *__pyx_v_self); static char __pyx_doc_12turbozipfile_7ZipFile_10namelist[] = "Return a list of file names in the archive."; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_11namelist = {"namelist", (PyCFunction)__pyx_pw_12turbozipfile_7ZipFile_11namelist, METH_O, __pyx_doc_12turbozipfile_7ZipFile_10namelist}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_11namelist(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("namelist (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_10namelist(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_10namelist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_7genexpr__pyx_v_data = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("namelist", 0); __Pyx_XDECREF(__pyx_r); { __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filelist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1208, __pyx_L5_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1208, __pyx_L5_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1208, __pyx_L5_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_data, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_data, __pyx_n_s_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1208, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_data); __pyx_7genexpr__pyx_v_data = 0; goto __pyx_L8_exit_scope; __pyx_L5_error:; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_data); __pyx_7genexpr__pyx_v_data = 0; goto __pyx_L1_error; __pyx_L8_exit_scope:; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile.ZipFile.namelist", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_data); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_13infolist(PyObject *__pyx_self, PyObject *__pyx_v_self); static char __pyx_doc_12turbozipfile_7ZipFile_12infolist[] = "Return a list of class ZipInfo instances for files in the\n\n archive.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_13infolist = {"infolist", (PyCFunction)__pyx_pw_12turbozipfile_7ZipFile_13infolist, METH_O, __pyx_doc_12turbozipfile_7ZipFile_12infolist}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_13infolist(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("infolist (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_12infolist(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_12infolist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("infolist", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filelist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("turbozipfile.ZipFile.infolist", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_15printdir(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_15printdir = {"printdir", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_15printdir, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_15printdir(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_file = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("printdir (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_file,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((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_self)) != 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_file); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "printdir") < 0)) __PYX_ERR(0, 1217, __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_self = values[0]; __pyx_v_file = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("printdir", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1217, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile.printdir", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_14printdir(__pyx_self, __pyx_v_self, __pyx_v_file); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_14printdir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file) { PyObject *__pyx_v_zinfo = NULL; PyObject *__pyx_v_date = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_UCS4 __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("printdir", 0); __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; __pyx_t_4 = __Pyx_PyObject_Format(__pyx_kp_u_File_Name, __pyx_kp_u_46); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u__39); __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__39); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__39); __pyx_t_4 = __Pyx_PyObject_Format(__pyx_kp_u_Modified, __pyx_kp_u_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u__39); __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__39); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__39); __pyx_t_4 = __Pyx_PyObject_Format(__pyx_n_u_Size, __pyx_kp_u_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_file, __pyx_v_file) < 0) __PYX_ERR(0, 1218, __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(0, 1218, __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; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filelist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); 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_2 = 0; __pyx_t_6 = NULL; } else { __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1219, __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(0, 1219, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1219, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1219, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_6(__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, 1219, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_zinfo, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_date_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 6, NULL, NULL, &__pyx_slice__40, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_d_02d_02d_02d_02d_02d, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_date, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_3 = 127; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_FormatAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_kp_u_46); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_3; __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = 0; __Pyx_INCREF(__pyx_kp_u__39); __pyx_t_7 += 1; __Pyx_GIVEREF(__pyx_kp_u__39); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_u__39); __Pyx_INCREF(__pyx_v_date); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_date) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_date) : __pyx_t_3; __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_date); __Pyx_GIVEREF(__pyx_v_date); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_date); __Pyx_INCREF(__pyx_kp_u__39); __pyx_t_7 += 1; __Pyx_GIVEREF(__pyx_kp_u__39); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_kp_u__39); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_file_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_t_8), __pyx_kp_u_12d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_3; __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_file, __pyx_v_file) < 0) __PYX_ERR(0, 1222, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1221, __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; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __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("turbozipfile.ZipFile.printdir", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_zinfo); __Pyx_XDECREF(__pyx_v_date); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_17testzip(PyObject *__pyx_self, PyObject *__pyx_v_self); static char __pyx_doc_12turbozipfile_7ZipFile_16testzip[] = "Read all the files and check the CRC."; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_17testzip = {"testzip", (PyCFunction)__pyx_pw_12turbozipfile_7ZipFile_17testzip, METH_O, __pyx_doc_12turbozipfile_7ZipFile_16testzip}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_17testzip(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("testzip (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_16testzip(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_16testzip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { long __pyx_v_chunk_size; PyObject *__pyx_v_zinfo = NULL; PyObject *__pyx_v_f = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); 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; int __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; int __pyx_t_17; PyObject *__pyx_t_18 = NULL; int __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("testzip", 0); __pyx_v_chunk_size = 0x100000; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filelist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __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(0, 1227, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; 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_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1227, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1227, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1227, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_zinfo, __pyx_t_1); __pyx_t_1 = 0; { __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); { { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_open); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1231, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_filename); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1231, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_11 = 0; 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_11 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_9, __pyx_n_u_r}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_9, __pyx_n_u_r}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1231, __pyx_L5_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_9); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_9); __Pyx_INCREF(__pyx_n_u_r); __Pyx_GIVEREF(__pyx_n_u_r); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_n_u_r); __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1231, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1231, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_12); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1231, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __pyx_t_8; __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); { __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_12); __pyx_t_12 = 0; while (1) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_v_chunk_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1232, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_12 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __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_12)) __PYX_ERR(0, 1232, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 1232, __pyx_L19_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!__pyx_t_17) break; } } __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; goto __pyx_L26_try_end; __pyx_L19_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; { __Pyx_AddTraceback("turbozipfile.ZipFile.testzip", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_1, &__pyx_t_8) < 0) __PYX_ERR(0, 1231, __pyx_L21_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_Pack(3, __pyx_t_12, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1231, __pyx_L21_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_9, NULL); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1231, __pyx_L21_except_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_18); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_17 < 0) __PYX_ERR(0, 1231, __pyx_L21_except_error) __pyx_t_19 = ((!(__pyx_t_17 != 0)) != 0); if (__pyx_t_19) { __Pyx_GIVEREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ErrRestoreWithState(__pyx_t_12, __pyx_t_1, __pyx_t_8); __pyx_t_12 = 0; __pyx_t_1 = 0; __pyx_t_8 = 0; __PYX_ERR(0, 1231, __pyx_L21_except_error) } __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L20_exception_handled; } __pyx_L21_except_error:; __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); goto __pyx_L5_error; __pyx_L20_exception_handled:; __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); __pyx_L26_try_end:; } } { { if (__pyx_t_13) { __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1231, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } goto __pyx_L18; } __pyx_L18:; } goto __pyx_L32; __pyx_L13_error:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_error; __pyx_L32:; } } __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_L12_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_1, &__pyx_t_12); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1234, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_8, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_ErrRestore(__pyx_t_8, __pyx_t_1, __pyx_t_12); __pyx_t_8 = 0; __pyx_t_1 = 0; __pyx_t_12 = 0; if (__pyx_t_11) { __Pyx_AddTraceback("turbozipfile.ZipFile.testzip", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_1, &__pyx_t_8) < 0) __PYX_ERR(0, 1234, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_filename); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1235, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L8_except_return; } goto __pyx_L7_except_error; __pyx_L7_except_error:; __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_L8_except_return:; __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_L0; __pyx_L12_try_end:; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __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_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("turbozipfile.ZipFile.testzip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_zinfo); __Pyx_XDECREF(__pyx_v_f); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_19getinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_7ZipFile_18getinfo[] = "Return the instance of ZipInfo given 'name'."; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_19getinfo = {"getinfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_19getinfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_7ZipFile_18getinfo}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_19getinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_name = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getinfo (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name_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_self)) != 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_name_2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getinfo", 1, 2, 2, 1); __PYX_ERR(0, 1237, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getinfo") < 0)) __PYX_ERR(0, 1237, __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_self = values[0]; __pyx_v_name = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getinfo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1237, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile.getinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_18getinfo(__pyx_self, __pyx_v_self, __pyx_v_name); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_18getinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_v_info = NULL; 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getinfo", 0); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NameToInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1239, __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 && likely(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_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_info = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_4 = (__pyx_v_info == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (unlikely(__pyx_t_5)) { __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_There_is_no_item_named_r_in_the, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __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, 1241, __pyx_L1_error) } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_info); __pyx_r = __pyx_v_info; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile.ZipFile.getinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_info); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_21setpassword(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_7ZipFile_20setpassword[] = "Set default password for encrypted files."; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_21setpassword = {"setpassword", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_21setpassword, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_7ZipFile_20setpassword}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_21setpassword(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_pwd = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setpassword (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pwd,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_self)) != 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_pwd)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("setpassword", 1, 2, 2, 1); __PYX_ERR(0, 1245, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setpassword") < 0)) __PYX_ERR(0, 1245, __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_self = values[0]; __pyx_v_pwd = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("setpassword", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1245, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile.setpassword", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_20setpassword(__pyx_self, __pyx_v_self, __pyx_v_pwd); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_20setpassword(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pwd) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setpassword", 0); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pwd); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1247, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = PyBytes_Check(__pyx_v_pwd); __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_pwd)), __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_pwd_expected_bytes_got_s, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1248, __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, 1248, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_pwd); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1249, __pyx_L1_error) if (__pyx_t_1) { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pwd, __pyx_v_pwd) < 0) __PYX_ERR(0, 1250, __pyx_L1_error) goto __pyx_L6; } { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pwd, Py_None) < 0) __PYX_ERR(0, 1252, __pyx_L1_error) } __pyx_L6:; __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("turbozipfile.ZipFile.setpassword", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_23comment(PyObject *__pyx_self, PyObject *__pyx_v_self); static char __pyx_doc_12turbozipfile_7ZipFile_22comment[] = "The comment text associated with the ZIP file."; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_23comment = {"comment", (PyCFunction)__pyx_pw_12turbozipfile_7ZipFile_23comment, METH_O, __pyx_doc_12turbozipfile_7ZipFile_22comment}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_23comment(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("comment (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_22comment(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_22comment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("comment", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comment_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("turbozipfile.ZipFile.comment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_25comment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_25comment = {"comment", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_25comment, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_25comment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_comment = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("comment (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_comment,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_self)) != 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_comment)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("comment", 1, 2, 2, 1); __PYX_ERR(0, 1260, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "comment") < 0)) __PYX_ERR(0, 1260, __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_self = values[0]; __pyx_v_comment = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("comment", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1260, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile.comment", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_24comment(__pyx_self, __pyx_v_self, __pyx_v_comment); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_24comment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_comment) { PyObject *__pyx_v_warnings = 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; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("comment", 0); __Pyx_INCREF(__pyx_v_comment); __pyx_t_1 = PyBytes_Check(__pyx_v_comment); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_comment)), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_comment_expected_bytes_got_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1262, __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_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1262, __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(0, 1262, __pyx_L1_error) } __pyx_t_5 = PyObject_Length(__pyx_v_comment); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1265, __pyx_L1_error) __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ZIP_MAX_COMMENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { __pyx_t_6 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_warnings = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ZIP_MAX_COMMENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Archive_comment_is_too_long_trun, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __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; __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_stacklevel, __pyx_int_2) < 0) __PYX_ERR(0, 1270, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ZIP_MAX_COMMENT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_comment, 0, 0, NULL, &__pyx_t_7, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_comment, __pyx_t_3); __pyx_t_3 = 0; } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comment_2, __pyx_v_comment) < 0) __PYX_ERR(0, 1272, __pyx_L1_error) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_didModify, Py_True) < 0) __PYX_ERR(0, 1273, __pyx_L1_error) __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_7); __Pyx_AddTraceback("turbozipfile.ZipFile.comment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_warnings); __Pyx_XDECREF(__pyx_v_comment); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_27read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_7ZipFile_26read[] = "Return file bytes for name."; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_27read = {"read", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_27read, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_7ZipFile_26read}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_27read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_pwd = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name_2,&__pyx_n_s_pwd,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)((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 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_self)) != 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_name_2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("read", 0, 2, 3, 1); __PYX_ERR(0, 1275, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pwd); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 1275, __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_self = values[0]; __pyx_v_name = values[1]; __pyx_v_pwd = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("read", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1275, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_26read(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_pwd); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_26read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_pwd) { PyObject *__pyx_v_fp = NULL; 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; 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; int __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 0); { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __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[4] = {__pyx_t_3, __pyx_v_name, __pyx_n_u_r, __pyx_v_pwd}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __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[4] = {__pyx_t_3, __pyx_v_name, __pyx_n_u_r, __pyx_v_pwd}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1277, __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_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name); __Pyx_INCREF(__pyx_n_u_r); __Pyx_GIVEREF(__pyx_n_u_r); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_r); __Pyx_INCREF(__pyx_v_pwd); __Pyx_GIVEREF(__pyx_v_pwd); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_pwd); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __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_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1277, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; { { __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); { __pyx_v_fp = __pyx_t_5; __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fp, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1278, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1278, __pyx_L7_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_L11_try_return; } __pyx_L7_error:; __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; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; { __Pyx_AddTraceback("turbozipfile.ZipFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 1277, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1277, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1277, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < 0) __PYX_ERR(0, 1277, __pyx_L9_except_error) __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_1, __pyx_t_2); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 1277, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L11_try_return:; __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_L4_return; __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); } } { { if (__pyx_t_6) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_9 = __pyx_r; __pyx_r = 0; if (__pyx_t_6) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L1_error; __pyx_L16:; } __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("turbozipfile.ZipFile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_29open(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_7ZipFile_28open[] = "Return file-like object for 'name'.\n\n name is a string for the file name within the ZIP file, or a ZipInfo\n object.\n mode should be 'r' to read a file already in the ZIP file, or 'w' to\n write to a file newly added to the archive.\n pwd is the password to decrypt files (only used for reading).\n When writing, if the file size is not known in advance but may exceed\n 2 GiB, pass force_zip64 to use the ZIP64 format, which can handle large\n files. If the size is known in advance, it is best to pass a ZipInfo\n instance for name, with zinfo.file_size set.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_29open = {"open", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_29open, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_7ZipFile_28open}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_29open(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_mode = 0; PyObject *__pyx_v_pwd = 0; CYTHON_UNUSED PyObject *__pyx_v_force_zip64 = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("open (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name_2,&__pyx_n_s_mode,&__pyx_n_s_pwd,&__pyx_n_s_force_zip64,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject *)((PyObject*)__pyx_n_u_r)); values[3] = ((PyObject *)((PyObject *)Py_None)); values[4] = ((PyObject *)((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_self)) != 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_name_2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("open", 0, 2, 4, 1); __PYX_ERR(0, 1280, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode); 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_pwd); if (value) { values[3] = value; kw_args--; } } } if (kw_args == 1) { const Py_ssize_t index = 4; PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = 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, 1280, __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); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_name = values[1]; __pyx_v_mode = values[2]; __pyx_v_pwd = values[3]; __pyx_v_force_zip64 = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("open", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1280, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile.open", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_28open(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_mode, __pyx_v_pwd, __pyx_v_force_zip64); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_28open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_mode, PyObject *__pyx_v_pwd, CYTHON_UNUSED PyObject *__pyx_v_force_zip64) { PyObject *__pyx_v_zinfo = NULL; PyObject *__pyx_v_zef_file = NULL; PyObject *__pyx_v_fheader = NULL; PyObject *__pyx_v_fname = NULL; PyObject *__pyx_v_fname_str = NULL; PyObject *__pyx_v_is_encrypted = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __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; 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; PyObject *__pyx_t_15 = NULL; Py_ssize_t __pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; Py_UCS4 __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open", 0); __Pyx_INCREF(__pyx_v_pwd); __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_r, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1293, __pyx_L1_error) if (unlikely(__pyx_t_1)) { __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __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(0, 1294, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_pwd); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1295, __pyx_L1_error) if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = PyBytes_Check(__pyx_v_pwd); __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); __pyx_t_1 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_1)) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_pwd)), __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_pwd_expected_bytes_got_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1296, __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_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1296, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_1) != 0); if (unlikely(__pyx_t_4)) { __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1298, __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(0, 1298, __pyx_L1_error) } __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ZipInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_IsInstance(__pyx_v_name, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { __Pyx_INCREF(__pyx_v_name); __pyx_v_zinfo = __pyx_v_name; goto __pyx_L8; } { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getinfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __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_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_name); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_zinfo = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L8:; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fileRefCnt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fileRefCnt, __pyx_t_5) < 0) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SharedFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_header_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fpclose); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_11 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_11 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 4+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __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(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 4+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __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(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_12 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1310, __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_6); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_11, __pyx_t_9); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_zef_file = __pyx_t_5; __pyx_t_5 = 0; { __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); { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_zef_file, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_sizeFileHeader); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1314, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_9, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1314, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_fheader = __pyx_t_5; __pyx_t_5 = 0; __pyx_t_16 = PyObject_Length(__pyx_v_fheader); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1315, __pyx_L9_error) __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1315, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sizeFileHeader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1315, __pyx_L9_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1315, __pyx_L9_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(__pyx_t_1)) { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __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_12 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_u_Truncated_file_header) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Truncated_file_header); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1316, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_12, 0, 0, 0); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __PYX_ERR(0, 1316, __pyx_L9_error) } __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_struct); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1317, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_structFileHeader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = NULL; __pyx_t_11 = 0; 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_11 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_2, __pyx_v_fheader}; __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1317, __pyx_L9_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_2, __pyx_v_fheader}; __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1317, __pyx_L9_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1317, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_11, __pyx_t_2); __Pyx_INCREF(__pyx_v_fheader); __Pyx_GIVEREF(__pyx_v_fheader); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_11, __pyx_v_fheader); __pyx_t_2 = 0; __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1317, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_fheader, __pyx_t_12); __pyx_t_12 = 0; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_FH_SIGNATURE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1318, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_fheader, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1318, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_stringFileHeader); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1318, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_t_12, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1318, __pyx_L9_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1318, __pyx_L9_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__pyx_t_1)) { __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1319, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_5, __pyx_kp_u_Bad_magic_number_for_file_header) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_kp_u_Bad_magic_number_for_file_header); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1319, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 1319, __pyx_L9_error) } __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_zef_file, __pyx_n_s_read); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1321, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FH_FILENAME_LENGTH); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1321, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_fheader, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1321, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1321, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_fname = __pyx_t_8; __pyx_t_8 = 0; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_FH_EXTRA_FIELD_LENGTH); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1322, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_fheader, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1322, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1322, __pyx_L9_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_1) { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_zef_file, __pyx_n_s_read); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1323, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FH_EXTRA_FIELD_LENGTH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_fheader, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_12 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1323, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_flag_bits); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1325, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = __Pyx_PyInt_AndObjC(__pyx_t_12, __pyx_int_32, 0x20, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1325, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1325, __pyx_L9_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__pyx_t_1)) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1327, __pyx_L9_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, 1327, __pyx_L9_error) } __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_flag_bits); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1329, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = __Pyx_PyInt_AndObjC(__pyx_t_8, __pyx_int_64, 0x40, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1329, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1329, __pyx_L9_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(__pyx_t_1)) { __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1331, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_Raise(__pyx_t_12, 0, 0, 0); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __PYX_ERR(0, 1331, __pyx_L9_error) } { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_fname, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1334, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } __pyx_t_12 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1334, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_fname_str = __pyx_t_12; __pyx_t_12 = 0; } __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; goto __pyx_L25_try_end; __pyx_L20_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __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; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_11) { __Pyx_AddTraceback("turbozipfile.ZipFile.open", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_8, &__pyx_t_5) < 0) __PYX_ERR(0, 1335, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_12, __pyx_t_8, __pyx_t_5); __pyx_t_12 = 0; __pyx_t_8 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 1336, __pyx_L22_except_error) } goto __pyx_L22_except_error; __pyx_L22_except_error:; __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); goto __pyx_L9_error; __pyx_L25_try_end:; } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_orig_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1339, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyObject_RichCompare(__pyx_v_fname_str, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1339, __pyx_L9_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1339, __pyx_L9_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__pyx_t_1)) { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1340, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = PyTuple_New(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1340, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_16 = 0; __pyx_t_20 = 127; __Pyx_INCREF(__pyx_kp_u_File_name_in_directory); __pyx_t_16 += 23; __Pyx_GIVEREF(__pyx_kp_u_File_name_in_directory); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_File_name_in_directory); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_orig_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1341, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_20; __pyx_t_16 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_9); __pyx_t_9 = 0; __Pyx_INCREF(__pyx_kp_u_and_header); __pyx_t_16 += 12; __Pyx_GIVEREF(__pyx_kp_u_and_header); PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_kp_u_and_header); __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_fname), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1341, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_20; __pyx_t_16 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_9); __pyx_t_9 = 0; __Pyx_INCREF(__pyx_kp_u_differ); __pyx_t_16 += 8; __Pyx_GIVEREF(__pyx_kp_u_differ); PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_kp_u_differ); __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_12, 5, __pyx_t_16, __pyx_t_20); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1340, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_8 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_12, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1340, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 1340, __pyx_L9_error) } __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_zinfo, __pyx_n_s_flag_bits); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1344, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyInt_AndObjC(__pyx_t_8, __pyx_int_1, 0x1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1344, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_is_encrypted = __pyx_t_5; __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_encrypted); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1345, __pyx_L9_error) if (__pyx_t_1) { __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_pwd); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1346, __pyx_L9_error) __pyx_t_4 = ((!__pyx_t_1) != 0); if (__pyx_t_4) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pwd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1347, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_pwd, __pyx_t_5); __pyx_t_5 = 0; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_pwd); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1348, __pyx_L9_error) __pyx_t_1 = ((!__pyx_t_4) != 0); if (unlikely(__pyx_t_1)) { __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_File_r_is_encrypted_password_req, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1350, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1349, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 1349, __pyx_L9_error) } goto __pyx_L29; } { __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_pwd, Py_None); } __pyx_L29:; __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ZipExtFile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1354, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; __pyx_t_11 = 0; 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_11 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[6] = {__pyx_t_9, __pyx_v_zef_file, __pyx_v_mode, __pyx_v_zinfo, __pyx_v_pwd, Py_True}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 5+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1354, __pyx_L9_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[6] = {__pyx_t_9, __pyx_v_zef_file, __pyx_v_mode, __pyx_v_zinfo, __pyx_v_pwd, Py_True}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 5+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1354, __pyx_L9_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_12 = PyTuple_New(5+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1354, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_v_zef_file); __Pyx_GIVEREF(__pyx_v_zef_file); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_zef_file); __Pyx_INCREF(__pyx_v_mode); __Pyx_GIVEREF(__pyx_v_mode); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_mode); __Pyx_INCREF(__pyx_v_zinfo); __Pyx_GIVEREF(__pyx_v_zinfo); PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_v_zinfo); __Pyx_INCREF(__pyx_v_pwd); __Pyx_GIVEREF(__pyx_v_pwd); PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_11, __pyx_v_pwd); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_12, 4+__pyx_t_11, Py_True); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1354, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L13_try_return; } __pyx_L9_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __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; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; { __Pyx_AddTraceback("turbozipfile.ZipFile.open", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_12) < 0) __PYX_ERR(0, 1355, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_zef_file, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1356, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_9 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1356, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GIVEREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_5, __pyx_t_12); __pyx_t_8 = 0; __pyx_t_5 = 0; __pyx_t_12 = 0; __PYX_ERR(0, 1357, __pyx_L11_except_error) } __pyx_L11_except_error:; __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_L13_try_return:; __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_L0; } __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __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_12); __Pyx_AddTraceback("turbozipfile.ZipFile.open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_zinfo); __Pyx_XDECREF(__pyx_v_zef_file); __Pyx_XDECREF(__pyx_v_fheader); __Pyx_XDECREF(__pyx_v_fname); __Pyx_XDECREF(__pyx_v_fname_str); __Pyx_XDECREF(__pyx_v_is_encrypted); __Pyx_XDECREF(__pyx_v_pwd); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_31extract(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_7ZipFile_30extract[] = "Extract a member from the archive to the current working directory,\n\n using its full name. Its file information is extracted as accurately\n as possible. `member' may be a filename or a ZipInfo object. You can\n specify a different directory using `path'.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_31extract = {"extract", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_31extract, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_7ZipFile_30extract}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_31extract(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_member = 0; PyObject *__pyx_v_path = 0; PyObject *__pyx_v_pwd = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("extract (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_member,&__pyx_n_s_path,&__pyx_n_s_pwd,0}; PyObject* values[4] = {0,0,0,0}; values[2] = ((PyObject *)((PyObject *)Py_None)); values[3] = ((PyObject *)((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 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_self)) != 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_member)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("extract", 0, 2, 4, 1); __PYX_ERR(0, 1359, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path); 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_pwd); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract") < 0)) __PYX_ERR(0, 1359, __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); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_member = values[1]; __pyx_v_path = values[2]; __pyx_v_pwd = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("extract", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1359, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile.extract", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_30extract(__pyx_self, __pyx_v_self, __pyx_v_member, __pyx_v_path, __pyx_v_pwd); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_30extract(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_member, PyObject *__pyx_v_path, PyObject *__pyx_v_pwd) { 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; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extract", 0); __Pyx_INCREF(__pyx_v_path); __pyx_t_1 = (__pyx_v_path == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getcwd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fspath); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __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_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_path); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extract_member); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1371, __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_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_v_member, __pyx_v_path, __pyx_v_pwd}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __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_member, __pyx_v_path, __pyx_v_pwd}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1371, __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_member); __Pyx_GIVEREF(__pyx_v_member); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_member); __Pyx_INCREF(__pyx_v_path); __Pyx_GIVEREF(__pyx_v_path); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_path); __Pyx_INCREF(__pyx_v_pwd); __Pyx_GIVEREF(__pyx_v_pwd); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_pwd); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; 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_7); __Pyx_AddTraceback("turbozipfile.ZipFile.extract", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_33extractall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_7ZipFile_32extractall[] = "Extract all members from the archive to the current working\n\n directory. `path' specifies a different directory to extract to.\n `members' is optional and must be a subset of the list returned\n by namelist().\n "; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_33extractall = {"extractall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_33extractall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_7ZipFile_32extractall}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_33extractall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_path = 0; PyObject *__pyx_v_members = 0; PyObject *__pyx_v_pwd = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("extractall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_path,&__pyx_n_s_members,&__pyx_n_s_pwd,0}; PyObject* values[4] = {0,0,0,0}; values[1] = ((PyObject *)((PyObject *)Py_None)); values[2] = ((PyObject *)((PyObject *)Py_None)); values[3] = ((PyObject *)((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 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_self)) != 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_path); 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_members); 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_pwd); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extractall") < 0)) __PYX_ERR(0, 1373, __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_self = values[0]; __pyx_v_path = values[1]; __pyx_v_members = values[2]; __pyx_v_pwd = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("extractall", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1373, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile.extractall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_32extractall(__pyx_self, __pyx_v_self, __pyx_v_path, __pyx_v_members, __pyx_v_pwd); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_32extractall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_members, PyObject *__pyx_v_pwd) { PyObject *__pyx_v_zipinfo = 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; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extractall", 0); __Pyx_INCREF(__pyx_v_path); __Pyx_INCREF(__pyx_v_members); __pyx_t_1 = (__pyx_v_members == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_namelist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1381, __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_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_members, __pyx_t_3); __pyx_t_3 = 0; } __pyx_t_2 = (__pyx_v_path == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getcwd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4; } { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fspath); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __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_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_path); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_path)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1387, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { __Pyx_INCREF(__pyx_v_path); __Pyx_DECREF_SET(__pyx_v_path, __pyx_v_path); } } __pyx_L4:; if (likely(PyList_CheckExact(__pyx_v_members)) || PyTuple_CheckExact(__pyx_v_members)) { __pyx_t_3 = __pyx_v_members; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_members); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1390, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1390, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1390, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__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, 1390, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_zipinfo, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extract_member); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __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[4] = {__pyx_t_8, __pyx_v_zipinfo, __pyx_v_path, __pyx_v_pwd}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 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_8, __pyx_v_zipinfo, __pyx_v_path, __pyx_v_pwd}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1391, __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_zipinfo); __Pyx_GIVEREF(__pyx_v_zipinfo); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_zipinfo); __Pyx_INCREF(__pyx_v_path); __Pyx_GIVEREF(__pyx_v_path); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_path); __Pyx_INCREF(__pyx_v_pwd); __Pyx_GIVEREF(__pyx_v_pwd); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_v_pwd); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __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_10); __Pyx_AddTraceback("turbozipfile.ZipFile.extractall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_zipinfo); __Pyx_XDECREF(__pyx_v_path); __Pyx_XDECREF(__pyx_v_members); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_35_extract_member(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_7ZipFile_34_extract_member[] = "Extract the ZipInfo object 'member' to a physical\n\n file on the path targetpath.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_35_extract_member = {"_extract_member", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_35_extract_member, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_7ZipFile_34_extract_member}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_35_extract_member(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_member = 0; PyObject *__pyx_v_targetpath = 0; PyObject *__pyx_v_pwd = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_extract_member (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_member,&__pyx_n_s_targetpath,&__pyx_n_s_pwd,0}; PyObject* values[4] = {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 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_self)) != 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_member)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_extract_member", 1, 4, 4, 1); __PYX_ERR(0, 1393, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_targetpath)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_extract_member", 1, 4, 4, 2); __PYX_ERR(0, 1393, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pwd)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_extract_member", 1, 4, 4, 3); __PYX_ERR(0, 1393, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_extract_member") < 0)) __PYX_ERR(0, 1393, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { 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); } __pyx_v_self = values[0]; __pyx_v_member = values[1]; __pyx_v_targetpath = values[2]; __pyx_v_pwd = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_extract_member", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1393, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile._extract_member", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_34_extract_member(__pyx_self, __pyx_v_self, __pyx_v_member, __pyx_v_targetpath, __pyx_v_pwd); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_12turbozipfile_7ZipFile_15_extract_member_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); static PyObject *__pyx_pf_12turbozipfile_7ZipFile_15_extract_member_genexpr(PyObject *__pyx_self) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *)__pyx_tp_new_12turbozipfile___pyx_scope_struct_2_genexpr(__pyx_ptype_12turbozipfile___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 1412, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12turbozipfile_7ZipFile_15_extract_member_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_ZipFile__extract_member_locals_g, __pyx_n_s_turbozipfile); if (unlikely(!gen)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } __pyx_L1_error:; __Pyx_AddTraceback("turbozipfile.ZipFile._extract_member.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_12turbozipfile_7ZipFile_15_extract_member_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; default: __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1412, __pyx_L1_error) if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arcname)) { __Pyx_RaiseClosureNameError("arcname"); __PYX_ERR(0, 1412, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arcname, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_1)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1412, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1412, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1412, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 1412, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_invalid_path_parts)) { __Pyx_RaiseClosureNameError("invalid_path_parts"); __PYX_ERR(0, 1412, __pyx_L1_error) } __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_x, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_invalid_path_parts, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1412, __pyx_L1_error) __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { __Pyx_INCREF(__pyx_cur_scope->__pyx_v_x); __pyx_r = __pyx_cur_scope->__pyx_v_x; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; __pyx_cur_scope->__pyx_t_1 = __pyx_t_5; __pyx_cur_scope->__pyx_t_2 = __pyx_t_6; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L7_resume_from_yield:; __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_2); __pyx_t_5 = __pyx_cur_scope->__pyx_t_1; __pyx_t_6 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1412, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); PyErr_SetNone(PyExc_StopIteration); 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("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_34_extract_member(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_member, PyObject *__pyx_v_targetpath, PyObject *__pyx_v_pwd) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *__pyx_cur_scope; PyObject *__pyx_v_upperdirs = NULL; PyObject *__pyx_v_source = NULL; PyObject *__pyx_v_target = 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; PyObject *__pyx_t_6 = NULL; int __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; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_extract_member", 0); __pyx_cur_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *)__pyx_tp_new_12turbozipfile___pyx_scope_struct_1__extract_member(__pyx_ptype_12turbozipfile___pyx_scope_struct_1__extract_member, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 1393, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __Pyx_INCREF(__pyx_v_member); __Pyx_INCREF(__pyx_v_targetpath); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ZipInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_member, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_3) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getinfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1399, __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_member) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_member); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_member, __pyx_t_1); __pyx_t_1 = 0; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_member, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sep); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __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[3] = {__pyx_t_6, __pyx_kp_u__8, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u__8, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1403, __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_kp_u__8); __Pyx_GIVEREF(__pyx_kp_u__8); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_u__8); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_arcname = __pyx_t_1; __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_altsep); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_arcname, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_altsep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sep); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __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[3] = {__pyx_t_6, __pyx_t_8, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_4); __pyx_t_8 = 0; __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_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_GOTREF(__pyx_cur_scope->__pyx_v_arcname); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_arcname, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_splitdrive); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_cur_scope->__pyx_v_arcname) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_v_arcname); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __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, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_arcname); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_arcname, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_curdir); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_pardir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_kp_b_); __Pyx_GIVEREF(__pyx_kp_b_); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_b_); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_9); __pyx_cur_scope->__pyx_v_invalid_path_parts = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sep); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_pf_12turbozipfile_7ZipFile_15_extract_member_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; 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_9 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_arcname); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_arcname, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __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[3] = {__pyx_t_1, __pyx_v_targetpath, __pyx_cur_scope->__pyx_v_arcname}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_targetpath, __pyx_cur_scope->__pyx_v_arcname}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(__pyx_v_targetpath); __Pyx_GIVEREF(__pyx_v_targetpath); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_targetpath); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arcname); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arcname); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_cur_scope->__pyx_v_arcname); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_targetpath, __pyx_t_9); __pyx_t_9 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_normpath); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; 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_9 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_targetpath) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_targetpath); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_targetpath, __pyx_t_9); __pyx_t_9 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dirname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; 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_9 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_targetpath) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_targetpath); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_upperdirs = __pyx_t_9; __pyx_t_9 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_upperdirs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1419, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; 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_9 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_upperdirs) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_upperdirs); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = ((!__pyx_t_2) != 0); __pyx_t_3 = __pyx_t_10; __pyx_L6_bool_binop_done:; if (__pyx_t_3) { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_makedirs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __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_9 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_upperdirs) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_upperdirs); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1420, __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; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_member, __pyx_n_s_is_dir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __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_9 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_3) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isdir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __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_9 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_targetpath) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_targetpath); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = ((!__pyx_t_3) != 0); if (__pyx_t_10) { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_mkdir); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_9 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_targetpath) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_targetpath); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_targetpath); __pyx_r = __pyx_v_targetpath; goto __pyx_L0; } { __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_open); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_member); __Pyx_GIVEREF(__pyx_v_member); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_member); __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pwd, __pyx_v_pwd) < 0) __PYX_ERR(0, 1427, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_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_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1427, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_4 = (__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_4)) __PYX_ERR(0, 1427, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_4; __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; { { __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); { __pyx_v_source = __pyx_t_5; __pyx_t_5 = 0; { __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_targetpath); __Pyx_GIVEREF(__pyx_v_targetpath); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_targetpath); __Pyx_INCREF(__pyx_n_u_wb); __Pyx_GIVEREF(__pyx_n_u_wb); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_u_wb); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1428, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1428, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = NULL; 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_5 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); { __pyx_v_target = __pyx_t_4; __pyx_t_4 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_shutil); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_copyfileobj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1429, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __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[3] = {__pyx_t_1, __pyx_v_source, __pyx_v_target}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1429, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_source, __pyx_v_target}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1429, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1429, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_v_source); __Pyx_INCREF(__pyx_v_target); __Pyx_GIVEREF(__pyx_v_target); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_v_target); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1429, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L29_try_end; __pyx_L24_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; { __Pyx_AddTraceback("turbozipfile.ZipFile._extract_member", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 1428, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_1, NULL); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1428, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_19); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (__pyx_t_10 < 0) __PYX_ERR(0, 1428, __pyx_L26_except_error) __pyx_t_3 = ((!(__pyx_t_10 != 0)) != 0); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_5, __pyx_t_9); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0; __PYX_ERR(0, 1428, __pyx_L26_except_error) } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L25_exception_handled; } __pyx_L26_except_error:; __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); goto __pyx_L14_error; __pyx_L25_exception_handled:; __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_L29_try_end:; } } { { if (__pyx_t_15) { __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1428, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } goto __pyx_L23; } __pyx_L23:; } goto __pyx_L33; __pyx_L20_error:; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L14_error; __pyx_L33:; } } __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_L19_try_end; __pyx_L14_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; { __Pyx_AddTraceback("turbozipfile.ZipFile._extract_member", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 1427, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_Pack(3, __pyx_t_9, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1427, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_15); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (__pyx_t_3 < 0) __PYX_ERR(0, 1427, __pyx_L16_except_error) __pyx_t_10 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestoreWithState(__pyx_t_9, __pyx_t_5, __pyx_t_4); __pyx_t_9 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __PYX_ERR(0, 1427, __pyx_L16_except_error) } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L15_exception_handled; } __pyx_L16_except_error:; __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_L15_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_L19_try_end:; } } { { if (__pyx_t_11) { __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } goto __pyx_L13; } __pyx_L13:; } goto __pyx_L37; __pyx_L10_error:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L1_error; __pyx_L37:; } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_targetpath); __pyx_r = __pyx_v_targetpath; 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_9); __Pyx_AddTraceback("turbozipfile.ZipFile._extract_member", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_upperdirs); __Pyx_XDECREF(__pyx_v_source); __Pyx_XDECREF(__pyx_v_target); __Pyx_XDECREF(__pyx_v_member); __Pyx_XDECREF(__pyx_v_targetpath); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_37__del__(PyObject *__pyx_self, PyObject *__pyx_v_self); static char __pyx_doc_12turbozipfile_7ZipFile_36__del__[] = "Call the \"close()\" method in case the user forgot."; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_37__del__ = {"__del__", (PyCFunction)__pyx_pw_12turbozipfile_7ZipFile_37__del__, METH_O, __pyx_doc_12turbozipfile_7ZipFile_36__del__}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_37__del__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_36__del__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_36__del__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__del__", 0); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1435, __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_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(0, 1435, __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; __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("turbozipfile.ZipFile.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_39close(PyObject *__pyx_self, PyObject *__pyx_v_self); static char __pyx_doc_12turbozipfile_7ZipFile_38close[] = "Close the file, and for mode 'w', 'x' and 'a' write the ending\n\n records.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_39close = {"close", (PyCFunction)__pyx_pw_12turbozipfile_7ZipFile_39close, METH_O, __pyx_doc_12turbozipfile_7ZipFile_38close}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_39close(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_38close(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_38close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_fp = 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("close", 0); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_fp = __pyx_t_1; __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fp, Py_None) < 0) __PYX_ERR(0, 1446, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fpclose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1447, __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_fp) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_fp); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __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_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("turbozipfile.ZipFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_7ZipFile_41_fpclose(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_7ZipFile_41_fpclose = {"_fpclose", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_7ZipFile_41_fpclose, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_7ZipFile_41_fpclose(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fp = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_fpclose (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fp,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_self)) != 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_fp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_fpclose", 1, 2, 2, 1); __PYX_ERR(0, 1449, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_fpclose") < 0)) __PYX_ERR(0, 1449, __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_self = values[0]; __pyx_v_fp = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_fpclose", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1449, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.ZipFile._fpclose", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_7ZipFile_40_fpclose(__pyx_self, __pyx_v_self, __pyx_v_fp); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_7ZipFile_40_fpclose(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_fpclose", 0); #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fileRefCnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __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(0, 1450, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(0, 1450, __pyx_L1_error) } } #endif __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fileRefCnt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fileRefCnt, __pyx_t_1) < 0) __PYX_ERR(0, 1451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fileRefCnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filePassed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_5) != 0); __pyx_t_3 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fp, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; 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_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __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; } __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_AddTraceback("turbozipfile.ZipFile._fpclose", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_21_parents(PyObject *__pyx_self, PyObject *__pyx_v_path); static char __pyx_doc_12turbozipfile_20_parents[] = "\n Given a path with elements separated by\n posixpath.sep, generate all parents of that path.\n >>> list(_parents('b/d'))\n ['b']\n >>> list(_parents('/b/d/'))\n ['/b']\n >>> list(_parents('b/d/f/'))\n ['b/d', 'b']\n >>> list(_parents('b'))\n []\n >>> list(_parents(''))\n []\n "; static PyMethodDef __pyx_mdef_12turbozipfile_21_parents = {"_parents", (PyCFunction)__pyx_pw_12turbozipfile_21_parents, METH_O, __pyx_doc_12turbozipfile_20_parents}; static PyObject *__pyx_pw_12turbozipfile_21_parents(PyObject *__pyx_self, PyObject *__pyx_v_path) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parents (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_20_parents(__pyx_self, ((PyObject *)__pyx_v_path)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_20_parents(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) { 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; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_parents", 0); __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_itertools); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_islice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ancestry); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_path); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_6 = 0; 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_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_int_1, Py_None}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_int_1, Py_None}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_5 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_int_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, Py_None); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; 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_AddTraceback("turbozipfile._parents", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_12turbozipfile_24generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); static PyObject *__pyx_pw_12turbozipfile_23_ancestry(PyObject *__pyx_self, PyObject *__pyx_v_path); static char __pyx_doc_12turbozipfile_22_ancestry[] = "\n Given a path with elements separated by\n posixpath.sep, generate all elements of that path\n >>> list(_ancestry('b/d'))\n ['b/d', 'b']\n >>> list(_ancestry('/b/d/'))\n ['/b/d', '/b']\n >>> list(_ancestry('b/d/f/'))\n ['b/d/f', 'b/d', 'b']\n >>> list(_ancestry('b'))\n ['b']\n >>> list(_ancestry(''))\n []\n "; static PyMethodDef __pyx_mdef_12turbozipfile_23_ancestry = {"_ancestry", (PyCFunction)__pyx_pw_12turbozipfile_23_ancestry, METH_O, __pyx_doc_12turbozipfile_22_ancestry}; static PyObject *__pyx_pw_12turbozipfile_23_ancestry(PyObject *__pyx_self, PyObject *__pyx_v_path) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_ancestry (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_22_ancestry(__pyx_self, ((PyObject *)__pyx_v_path)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_22_ancestry(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ancestry", 0); __pyx_cur_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *)__pyx_tp_new_12turbozipfile___pyx_scope_struct_3__ancestry(__pyx_ptype_12turbozipfile___pyx_scope_struct_3__ancestry, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 1473, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_path = __pyx_v_path; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_path); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12turbozipfile_24generator, __pyx_codeobj__45, (PyObject *) __pyx_cur_scope, __pyx_n_s_ancestry, __pyx_n_s_ancestry, __pyx_n_s_turbozipfile); if (unlikely(!gen)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } __pyx_L1_error:; __Pyx_AddTraceback("turbozipfile._ancestry", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_12turbozipfile_24generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *__pyx_cur_scope = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_ancestry", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; default: __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1473, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_path, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_posixpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sep); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __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_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_path); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_path, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; while (1) { __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_path); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1489, __pyx_L1_error) if (__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L6_bool_binop_done; } __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_posixpath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sep); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_path, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1489, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_t_6; __pyx_L6_bool_binop_done:; if (!__pyx_t_5) break; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path); __pyx_r = __pyx_cur_scope->__pyx_v_path; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L8_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_cur_scope->__pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_path); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; 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(0, 1491, __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_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1491, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_unpacking_done; __pyx_L9_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 1491, __pyx_L1_error) __pyx_L10_unpacking_done:; } __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_path); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_path, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_tail); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tail, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); PyErr_SetNone(PyExc_StopIteration); 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("_ancestry", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_26_difference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_25_difference[] = "\n Return items in minuend not in subtrahend, retaining order\n with O(1) lookup.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_26_difference = {"_difference", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_26_difference, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_25_difference}; static PyObject *__pyx_pw_12turbozipfile_26_difference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_minuend = 0; PyObject *__pyx_v_subtrahend = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_difference (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_minuend,&__pyx_n_s_subtrahend,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_minuend)) != 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_subtrahend)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_difference", 1, 2, 2, 1); __PYX_ERR(0, 1498, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_difference") < 0)) __PYX_ERR(0, 1498, __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_minuend = values[0]; __pyx_v_subtrahend = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_difference", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1498, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile._difference", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_25_difference(__pyx_self, __pyx_v_minuend, __pyx_v_subtrahend); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_25_difference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_minuend, PyObject *__pyx_v_subtrahend) { 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; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_difference", 0); __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_itertools); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_filterfalse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySet_New(__pyx_v_subtrahend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_contains); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_5 = 0; 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_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_minuend}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __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[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_minuend}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_v_minuend); __Pyx_GIVEREF(__pyx_v_minuend); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_minuend); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; 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_6); __Pyx_AddTraceback("turbozipfile._difference", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_12CompleteDirs_1_implied_dirs(PyObject *__pyx_self, PyObject *__pyx_v_names); static PyMethodDef __pyx_mdef_12turbozipfile_12CompleteDirs_1_implied_dirs = {"_implied_dirs", (PyCFunction)__pyx_pw_12turbozipfile_12CompleteDirs_1_implied_dirs, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_12CompleteDirs_1_implied_dirs(PyObject *__pyx_self, PyObject *__pyx_v_names) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_implied_dirs (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_12CompleteDirs__implied_dirs(__pyx_self, ((PyObject *)__pyx_v_names)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_12turbozipfile_12CompleteDirs_13_implied_dirs_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs_13_implied_dirs_genexpr(PyObject *__pyx_self) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *)__pyx_tp_new_12turbozipfile___pyx_scope_struct_5_genexpr(__pyx_ptype_12turbozipfile___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 1515, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12turbozipfile_12CompleteDirs_13_implied_dirs_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_CompleteDirs__implied_dirs_local, __pyx_n_s_turbozipfile); if (unlikely(!gen)) __PYX_ERR(0, 1515, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } __pyx_L1_error:; __Pyx_AddTraceback("turbozipfile.CompleteDirs._implied_dirs.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_12turbozipfile_12CompleteDirs_13_implied_dirs_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1515, __pyx_L1_error) if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_parents)) { __Pyx_RaiseClosureNameError("parents"); __PYX_ERR(0, 1515, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_parents)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_parents)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_parents; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_parents); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __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(0, 1515, __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(0, 1515, __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(0, 1515, __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(0, 1515, __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(0, 1515, __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(0, 1515, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_posixpath); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sep); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_cur_scope->__pyx_v_p, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1515, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs__implied_dirs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_names) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *__pyx_cur_scope; PyObject *__pyx_v_as_dirs = 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; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_implied_dirs", 0); __pyx_cur_scope = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *)__pyx_tp_new_12turbozipfile___pyx_scope_struct_4__implied_dirs(__pyx_ptype_12turbozipfile___pyx_scope_struct_4__implied_dirs, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 1513, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_itertools); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_chain); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_from_iterable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_parents); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_INCREF(__pyx_v_names); __Pyx_GIVEREF(__pyx_v_names); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_names); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_1)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_parents = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __pyx_pf_12turbozipfile_12CompleteDirs_13_implied_dirs_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_as_dirs = __pyx_t_1; __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dedupe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_difference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1516, __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_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_v_as_dirs, __pyx_v_names}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __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[3] = {__pyx_t_5, __pyx_v_as_dirs, __pyx_v_names}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1516, __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_as_dirs); __Pyx_GIVEREF(__pyx_v_as_dirs); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_as_dirs); __Pyx_INCREF(__pyx_v_names); __Pyx_GIVEREF(__pyx_v_names); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_names); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_1)) __PYX_ERR(0, 1516, __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; __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_AddTraceback("turbozipfile.CompleteDirs._implied_dirs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_as_dirs); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_12CompleteDirs_3namelist(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_12CompleteDirs_3namelist = {"namelist", (PyCFunction)__pyx_pw_12turbozipfile_12CompleteDirs_3namelist, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_12CompleteDirs_3namelist(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("namelist (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_12CompleteDirs_2namelist(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs_2namelist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_names = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("namelist", 0); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CompleteDirs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_namelist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1519, __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 && likely(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_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_names = __pyx_t_1; __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_implied_dirs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_v_names) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_names); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_v_names, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile.CompleteDirs.namelist", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_names); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_12CompleteDirs_5_name_set(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_12CompleteDirs_5_name_set = {"_name_set", (PyCFunction)__pyx_pw_12turbozipfile_12CompleteDirs_5_name_set, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_12CompleteDirs_5_name_set(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_name_set (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_12CompleteDirs_4_name_set(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs_4_name_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_name_set", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_namelist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __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_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(0, 1523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __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; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile.CompleteDirs._name_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_12CompleteDirs_7resolve_dir(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_12CompleteDirs_6resolve_dir[] = "\n If the name represents a directory, return that name\n as a directory (with the trailing slash).\n "; static PyMethodDef __pyx_mdef_12turbozipfile_12CompleteDirs_7resolve_dir = {"resolve_dir", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_12CompleteDirs_7resolve_dir, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_12CompleteDirs_6resolve_dir}; static PyObject *__pyx_pw_12turbozipfile_12CompleteDirs_7resolve_dir(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_name = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("resolve_dir (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name_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_self)) != 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_name_2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("resolve_dir", 1, 2, 2, 1); __PYX_ERR(0, 1525, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_dir") < 0)) __PYX_ERR(0, 1525, __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_self = values[0]; __pyx_v_name = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("resolve_dir", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1525, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.CompleteDirs.resolve_dir", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_12CompleteDirs_6resolve_dir(__pyx_self, __pyx_v_self, __pyx_v_name); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs_6resolve_dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_v_names = NULL; PyObject *__pyx_v_dirname = NULL; PyObject *__pyx_v_dir_match = NULL; 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resolve_dir", 0); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __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_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(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_names = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_v_name, __pyx_kp_u__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_dirname = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_v_names, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1532, __pyx_L1_error) if (__pyx_t_4) { } else { __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L3_bool_binop_done; } __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_dirname, __pyx_v_names, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1532, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; __pyx_L3_bool_binop_done:; __pyx_v_dir_match = __pyx_t_1; __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_dir_match); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1533, __pyx_L1_error) if (__pyx_t_4) { __Pyx_INCREF(__pyx_v_dirname); __pyx_t_1 = __pyx_v_dirname; } else { __Pyx_INCREF(__pyx_v_name); __pyx_t_1 = __pyx_v_name; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile.CompleteDirs.resolve_dir", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_names); __Pyx_XDECREF(__pyx_v_dirname); __Pyx_XDECREF(__pyx_v_dir_match); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_12CompleteDirs_9make(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_12CompleteDirs_8make[] = "\n Given a source (filename or zipfile), return an\n appropriate CompleteDirs subclass.\n "; static PyMethodDef __pyx_mdef_12turbozipfile_12CompleteDirs_9make = {"make", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_12CompleteDirs_9make, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_12CompleteDirs_8make}; static PyObject *__pyx_pw_12turbozipfile_12CompleteDirs_9make(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_source = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("make (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_source,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_cls)) != 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_source)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("make", 1, 2, 2, 1); __PYX_ERR(0, 1536, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "make") < 0)) __PYX_ERR(0, 1536, __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_cls = values[0]; __pyx_v_source = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("make", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1536, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.CompleteDirs.make", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_12CompleteDirs_8make(__pyx_self, __pyx_v_cls, __pyx_v_source); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_12CompleteDirs_8make(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_source) { PyObject *__pyx_v_res = 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; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make", 0); __Pyx_INCREF(__pyx_v_cls); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CompleteDirs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_source, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_source); __pyx_r = __pyx_v_source; goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ZipFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_source, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1544, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_cls); __pyx_t_4 = __pyx_v_cls; __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_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_source) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_source); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CompleteDirs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_cls, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_new); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1550, __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_cls) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_cls); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_res = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_vars, __pyx_v_res); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_vars, __pyx_v_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1551, __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; __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; 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_AddTraceback("turbozipfile.CompleteDirs.make", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_res); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10FastLookup_1namelist(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_10FastLookup_1namelist = {"namelist", (PyCFunction)__pyx_pw_12turbozipfile_10FastLookup_1namelist, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_10FastLookup_1namelist(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("namelist (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_10FastLookup_namelist(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10FastLookup_namelist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { 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; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("namelist", 0); { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_contextlib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_suppress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __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_builtin_AttributeError) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_builtin_AttributeError); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1562, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__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_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_FastLookup__names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L11_try_return; } __pyx_L7_error:; __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; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; { __Pyx_AddTraceback("turbozipfile.FastLookup.namelist", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 1562, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1562, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1562, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_10 < 0) __PYX_ERR(0, 1562, __pyx_L9_except_error) __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 1562, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L11_try_return:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L4_return; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); } } { { if (__pyx_t_4) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_8 = __pyx_r; __pyx_r = 0; if (__pyx_t_4) { __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L1_error; __pyx_L16:; } __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FastLookup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_namelist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_FastLookup__names, __pyx_t_2) < 0) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_FastLookup__names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; 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("turbozipfile.FastLookup.namelist", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_10FastLookup_3_name_set(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_10FastLookup_3_name_set = {"_name_set", (PyCFunction)__pyx_pw_12turbozipfile_10FastLookup_3_name_set, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_10FastLookup_3_name_set(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_name_set (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_10FastLookup_2_name_set(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_10FastLookup_2_name_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { 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; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_name_set", 0); { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_contextlib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_suppress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __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_builtin_AttributeError) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_builtin_AttributeError); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__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_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_FastLookup__lookup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1569, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L11_try_return; } __pyx_L7_error:; __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; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; { __Pyx_AddTraceback("turbozipfile.FastLookup._name_set", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 1568, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1568, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1568, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_10 < 0) __PYX_ERR(0, 1568, __pyx_L9_except_error) __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 1568, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L11_try_return:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L4_return; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); } } { { if (__pyx_t_4) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_8 = __pyx_r; __pyx_r = 0; if (__pyx_t_4) { __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L1_error; __pyx_L16:; } __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FastLookup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_FastLookup__lookup, __pyx_t_2) < 0) __PYX_ERR(0, 1570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_FastLookup__lookup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; 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("turbozipfile.FastLookup._name_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_4Path_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_root = 0; PyObject *__pyx_v_at = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_root,&__pyx_n_s_at,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)((PyObject*)__pyx_kp_u_)); 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_self)) != 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_root)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 1623, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_at); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1623, __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_self = values[0]; __pyx_v_root = values[1]; __pyx_v_at = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1623, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.Path.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_4Path___init__(__pyx_self, __pyx_v_self, __pyx_v_root, __pyx_v_at); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_root, PyObject *__pyx_v_at) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FastLookup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_make); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __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_v_root) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_root); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_root, __pyx_t_1) < 0) __PYX_ERR(0, 1624, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_at, __pyx_v_at) < 0) __PYX_ERR(0, 1625, __pyx_L1_error) __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("turbozipfile.Path.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_3open(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static char __pyx_doc_12turbozipfile_4Path_2open[] = "\n Open this entry as text or binary following the semantics\n of ``pathlib.Path.open()`` by passing arguments through\n to io.TextIOWrapper().\n "; static PyMethodDef __pyx_mdef_12turbozipfile_4Path_3open = {"open", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_4Path_3open, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12turbozipfile_4Path_2open}; static PyObject *__pyx_pw_12turbozipfile_4Path_3open(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_mode = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("open (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) > 2) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, 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,&__pyx_n_s_mode,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)((PyObject*)__pyx_n_u_r)); 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 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; } 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; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "open") < 0)) __PYX_ERR(0, 1627, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { default: case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; case 0: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_mode = 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, 1627, __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("turbozipfile.Path.open", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_4Path_2open(__pyx_self, __pyx_v_self, __pyx_v_mode, __pyx_v_args, __pyx_v_kwargs); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_2open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_pwd = NULL; PyObject *__pyx_v_zip_mode = NULL; PyObject *__pyx_v_stream = 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; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open", 0); __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_kwargs, __pyx_n_u_pwd, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_pwd = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_mode, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_zip_mode = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_at); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __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_zip_mode); __Pyx_GIVEREF(__pyx_v_zip_mode); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_zip_mode); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pwd, __pyx_v_pwd) < 0) __PYX_ERR(0, 1635, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1635, __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_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_stream = __pyx_t_4; __pyx_t_4 = 0; __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_b, __pyx_v_mode, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1636, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { __pyx_t_5 = (PyTuple_GET_SIZE(__pyx_v_args) != 0); if (!__pyx_t_5) { } else { __pyx_t_6 = __pyx_t_5; goto __pyx_L5_bool_binop_done; } __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1637, __pyx_L1_error) __pyx_t_6 = __pyx_t_5; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_6)) { __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1638, __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, 1638, __pyx_L1_error) } __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_stream); __pyx_r = __pyx_v_stream; goto __pyx_L0; } __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_io); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TextIOWrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_stream); __Pyx_GIVEREF(__pyx_v_stream); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_stream); __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; 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("turbozipfile.Path.open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pwd); __Pyx_XDECREF(__pyx_v_zip_mode); __Pyx_XDECREF(__pyx_v_stream); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_5name(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_5name = {"name", (PyCFunction)__pyx_pw_12turbozipfile_4Path_5name, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_5name(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("name (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_4Path_4name(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_4name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("name", 0); __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_basename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_at); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; 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_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_u__8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; 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_AddTraceback("turbozipfile.Path.name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_7read_text(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_7read_text = {"read_text", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_4Path_7read_text, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_7read_text(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_text (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, "read_text") < 0)) __PYX_ERR(0, 1646, __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("read_text", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1646, __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("turbozipfile.Path.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_4Path_6read_text(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_6read_text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_strm = 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; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text", 0); { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Add(__pyx_tuple__47, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1647, __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_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1647, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1647, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__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_v_strm = __pyx_t_2; __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_strm, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1648, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1648, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L11_try_return; } __pyx_L7_error:; __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; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; { __Pyx_AddTraceback("turbozipfile.Path.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1647, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1647, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_10 < 0) __PYX_ERR(0, 1647, __pyx_L9_except_error) __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __PYX_ERR(0, 1647, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L11_try_return:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L4_return; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); } } { { if (__pyx_t_5) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_8 = __pyx_r; __pyx_r = 0; if (__pyx_t_5) { __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L1_error; __pyx_L16:; } __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("turbozipfile.Path.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_strm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_9read_bytes(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_9read_bytes = {"read_bytes", (PyCFunction)__pyx_pw_12turbozipfile_4Path_9read_bytes, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_9read_bytes(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_bytes (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_4Path_8read_bytes(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_8read_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_strm = 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; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_bytes", 0); { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __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_n_u_rb) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_rb); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1651, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; 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_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__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_v_strm = __pyx_t_3; __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_strm, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1652, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1652, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L11_try_return; } __pyx_L7_error:; __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; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; { __Pyx_AddTraceback("turbozipfile.Path.read_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 1651, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1651, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1651, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_10 < 0) __PYX_ERR(0, 1651, __pyx_L9_except_error) __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_1, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 1651, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L11_try_return:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L4_return; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); } } { { if (__pyx_t_4) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_8 = __pyx_r; __pyx_r = 0; if (__pyx_t_4) { __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L1_error; __pyx_L16:; } __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("turbozipfile.Path.read_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_strm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_11_is_child(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_11_is_child = {"_is_child", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_4Path_11_is_child, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_11_is_child(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_path = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_child (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_path,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_self)) != 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_path)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_is_child", 1, 2, 2, 1); __PYX_ERR(0, 1654, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_is_child") < 0)) __PYX_ERR(0, 1654, __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_self = values[0]; __pyx_v_path = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_is_child", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1654, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.Path._is_child", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_4Path_10_is_child(__pyx_self, __pyx_v_self, __pyx_v_path); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_10_is_child(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_path) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_child", 0); __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dirname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_at); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; 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_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_u__8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_at); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_kp_u__8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__8); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; 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_AddTraceback("turbozipfile.Path._is_child", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_13_next(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_13_next = {"_next", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_4Path_13_next, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_13_next(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_at = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_next (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_at,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_self)) != 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_at)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_next", 1, 2, 2, 1); __PYX_ERR(0, 1657, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_next") < 0)) __PYX_ERR(0, 1657, __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_self = values[0]; __pyx_v_at = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_next", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1657, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.Path._next", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_4Path_12_next(__pyx_self, __pyx_v_self, __pyx_v_at); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_12_next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_at) { 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; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_next", 0); __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_root); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(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_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_at}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_at}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_v_at); __Pyx_GIVEREF(__pyx_v_at); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_at); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; 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_6); __Pyx_AddTraceback("turbozipfile.Path._next", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_15is_dir(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_15is_dir = {"is_dir", (PyCFunction)__pyx_pw_12turbozipfile_4Path_15is_dir, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_15is_dir(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_dir (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_4Path_14is_dir(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_14is_dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_dir", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_at); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (!__pyx_t_3); if (!__pyx_t_4) { } else { __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L3_bool_binop_done; } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_at); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_endswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; 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_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_kp_u__8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u__8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("turbozipfile.Path.is_dir", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_17is_file(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_17is_file = {"is_file", (PyCFunction)__pyx_pw_12turbozipfile_4Path_17is_file, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_17is_file(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_file (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_4Path_16is_file(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_16is_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_file", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_dir); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1664, __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_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(0, 1664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1664, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile.Path.is_file", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_19exists(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_19exists = {"exists", (PyCFunction)__pyx_pw_12turbozipfile_4Path_19exists, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_19exists(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("exists (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_4Path_18exists(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_18exists(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { 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; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("exists", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_at); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_root); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; 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("turbozipfile.Path.exists", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_21iterdir(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_21iterdir = {"iterdir", (PyCFunction)__pyx_pw_12turbozipfile_4Path_21iterdir, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_21iterdir(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("iterdir (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_4Path_20iterdir(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_20iterdir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_subs = NULL; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("iterdir", 0); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_dir); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1670, __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_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(0, 1670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1670, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (unlikely(__pyx_t_5)) { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __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, 1671, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_root); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_namelist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_subs = __pyx_t_2; __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_child); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_INCREF(__pyx_v_subs); __Pyx_GIVEREF(__pyx_v_subs); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_subs); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; 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("turbozipfile.Path.iterdir", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_subs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_23__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_23__str__ = {"__str__", (PyCFunction)__pyx_pw_12turbozipfile_4Path_23__str__, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_23__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_4Path_22__str__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_22__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { 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; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_root); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_at); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(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[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1676, __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_4); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; 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_AddTraceback("turbozipfile.Path.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_25__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_25__repr__ = {"__repr__", (PyCFunction)__pyx_pw_12turbozipfile_4Path_25__repr__, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_25__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_4Path_24__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_24__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Path__repr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_self, __pyx_v_self) < 0) __PYX_ERR(0, 1679, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("turbozipfile.Path.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_27joinpath(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_27joinpath = {"joinpath", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_4Path_27joinpath, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_27joinpath(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_add = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("joinpath (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_add,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_self)) != 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_add)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("joinpath", 1, 2, 2, 1); __PYX_ERR(0, 1681, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "joinpath") < 0)) __PYX_ERR(0, 1681, __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_self = values[0]; __pyx_v_add = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("joinpath", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1681, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.Path.joinpath", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_4Path_26joinpath(__pyx_self, __pyx_v_self, __pyx_v_add); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_26joinpath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_add) { PyObject *__pyx_v_next = 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; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("joinpath", 0); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_at); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; 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_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_add}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_add}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_v_add); __Pyx_GIVEREF(__pyx_v_add); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_add); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_next = __pyx_t_1; __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_root); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_resolve_dir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_next) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_next); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; 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_6); __Pyx_AddTraceback("turbozipfile.Path.joinpath", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_next); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_4Path_29parent(PyObject *__pyx_self, PyObject *__pyx_v_self); static PyMethodDef __pyx_mdef_12turbozipfile_4Path_29parent = {"parent", (PyCFunction)__pyx_pw_12turbozipfile_4Path_29parent, METH_O, 0}; static PyObject *__pyx_pw_12turbozipfile_4Path_29parent(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parent (wrapper)", 0); __pyx_r = __pyx_pf_12turbozipfile_4Path_28parent(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_4Path_28parent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_parent_at = 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; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parent", 0); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dirname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_at); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; 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_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_u__8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(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_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_parent_at = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_parent_at); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1690, __pyx_L1_error) if (__pyx_t_6) { __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_parent_at, __pyx_kp_u__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_parent_at, __pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_v_parent_at) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_parent_at); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; 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_AddTraceback("turbozipfile.Path.parent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_parent_at); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pw_12turbozipfile_28main(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); static PyMethodDef __pyx_mdef_12turbozipfile_28main = {"main", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12turbozipfile_28main, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_12turbozipfile_28main(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("main (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)((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_args); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "main") < 0)) __PYX_ERR(0, 1695, __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_args = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("main", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1695, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("turbozipfile.main", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_12turbozipfile_27main(__pyx_self, __pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_12turbozipfile_27main(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) { PyObject *__pyx_v_argparse = NULL; PyObject *__pyx_v_description = NULL; PyObject *__pyx_v_parser = NULL; PyObject *__pyx_v_group = NULL; PyObject *__pyx_v_src = NULL; PyObject *__pyx_v_zf = NULL; PyObject *__pyx_v_badfile = NULL; PyObject *__pyx_v_curdir = NULL; 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; 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)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("main", 0); __Pyx_INCREF(__pyx_v_args); __pyx_t_1 = __Pyx_Import(__pyx_n_s_argparse, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_argparse = __pyx_t_1; __pyx_t_1 = 0; __Pyx_INCREF(__pyx_kp_u_A_simple_command_line_interface); __pyx_v_description = __pyx_kp_u_A_simple_command_line_interface; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_argparse, __pyx_n_s_ArgumentParser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_description, __pyx_v_description) < 0) __PYX_ERR(0, 1699, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1699, __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_v_parser = __pyx_t_3; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_mutually_exclusive_group); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 1700, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_group = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_metavar, __pyx_kp_u_zipfile) < 0) __PYX_ERR(0, 1702, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_help, __pyx_kp_u_Show_listing_of_a_zipfile) < 0) __PYX_ERR(0, 1702, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__49, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1701, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nargs, __pyx_int_2) < 0) __PYX_ERR(0, 1706, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_metavar, __pyx_tuple__51) < 0) __PYX_ERR(0, 1706, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_help, __pyx_kp_u_Extract_zipfile_into_target_dir) < 0) __PYX_ERR(0, 1706, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__50, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_add_argument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_metavar, __pyx_kp_u_zipfile) < 0) __PYX_ERR(0, 1710, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_help, __pyx_kp_u_Test_if_a_zipfile_is_valid) < 0) __PYX_ERR(0, 1710, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__52, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1709, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_parse_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_args) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_args); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_test_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_test_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_src = __pyx_t_3; __pyx_t_3 = 0; { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ZipFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __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[3] = {__pyx_t_1, __pyx_v_src, __pyx_n_u_r}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_src, __pyx_n_u_r}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(__pyx_v_src); __Pyx_GIVEREF(__pyx_v_src); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_src); __Pyx_INCREF(__pyx_n_u_r); __Pyx_GIVEREF(__pyx_n_u_r); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_u_r); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1715, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = NULL; 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_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1715, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; { { __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); { __pyx_v_zf = __pyx_t_7; __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_zf, __pyx_n_s_testzip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1716, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_7 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1716, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_badfile = __pyx_t_7; __pyx_t_7 = 0; } __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_L13_try_end; __pyx_L8_error:; __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; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; { __Pyx_AddTraceback("turbozipfile.main", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 1715, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_Pack(3, __pyx_t_7, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1715, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_5 < 0) __PYX_ERR(0, 1715, __pyx_L10_except_error) __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_3, __pyx_t_2); __pyx_t_7 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 1715, __pyx_L10_except_error) } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; __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_L9_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_L13_try_end:; } } { { if (__pyx_t_8) { __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } goto __pyx_L7; } __pyx_L7:; } goto __pyx_L17; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L1_error; __pyx_L17:; } if (unlikely(!__pyx_v_badfile)) { __Pyx_RaiseUnboundLocalError("badfile"); __PYX_ERR(0, 1717, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_badfile); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1717, __pyx_L1_error) if (__pyx_t_4) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_The_following_enclosed_file_is_c, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(!__pyx_v_badfile)) { __Pyx_RaiseUnboundLocalError("badfile"); __PYX_ERR(0, 1718, __pyx_L1_error) } __pyx_t_7 = NULL; 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_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_badfile) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_badfile); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_list_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_list_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_src = __pyx_t_3; __pyx_t_3 = 0; { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ZipFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __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[3] = {__pyx_t_7, __pyx_v_src, __pyx_n_u_r}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_src, __pyx_n_u_r}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_v_src); __Pyx_GIVEREF(__pyx_v_src); PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_src); __Pyx_INCREF(__pyx_n_u_r); __Pyx_GIVEREF(__pyx_n_u_r); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_n_u_r); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1723, __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_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = NULL; 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_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; { { __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); { __pyx_v_zf = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_zf, __pyx_n_s_printdir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1724, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(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_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1724, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __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_L28_try_end; __pyx_L23_error:; __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; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; { __Pyx_AddTraceback("turbozipfile.main", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 1723, __pyx_L25_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1723, __pyx_L25_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1723, __pyx_L25_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_5 < 0) __PYX_ERR(0, 1723, __pyx_L25_except_error) __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 1723, __pyx_L25_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L24_exception_handled; } __pyx_L25_except_error:; __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_L24_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_L28_try_end:; } } { { if (__pyx_t_8) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L22; } __pyx_L22:; } goto __pyx_L32; __pyx_L19_error:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L1_error; __pyx_L32:; } goto __pyx_L3; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_extract_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_extract_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { 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(0, 1727, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_13(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L33_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L33_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1727, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L34_unpacking_done; __pyx_L33_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 1727, __pyx_L1_error) __pyx_L34_unpacking_done:; } __pyx_v_src = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_curdir = __pyx_t_1; __pyx_t_1 = 0; { __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ZipFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_src, __pyx_n_u_r}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_src, __pyx_n_u_r}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_src); __Pyx_GIVEREF(__pyx_v_src); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_src); __Pyx_INCREF(__pyx_n_u_r); __Pyx_GIVEREF(__pyx_n_u_r); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_u_r); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1728, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1728, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __pyx_t_1; __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; { { __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); { __pyx_v_zf = __pyx_t_7; __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_zf, __pyx_n_s_extractall); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1729, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_curdir) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_curdir); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1729, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __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_L44_try_end; __pyx_L39_error:; __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; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; { __Pyx_AddTraceback("turbozipfile.main", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1728, __pyx_L41_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_Pack(3, __pyx_t_7, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1728, __pyx_L41_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1728, __pyx_L41_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_5 < 0) __PYX_ERR(0, 1728, __pyx_L41_except_error) __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_2, __pyx_t_1); __pyx_t_7 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __PYX_ERR(0, 1728, __pyx_L41_except_error) } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L40_exception_handled; } __pyx_L41_except_error:; __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_L40_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_L44_try_end:; } } { { if (__pyx_t_8) { __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__2, NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } goto __pyx_L38; } __pyx_L38:; } goto __pyx_L48; __pyx_L35_error:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L1_error; __pyx_L48:; } } __pyx_L3:; __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_7); __Pyx_AddTraceback("turbozipfile.main", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_argparse); __Pyx_XDECREF(__pyx_v_description); __Pyx_XDECREF(__pyx_v_parser); __Pyx_XDECREF(__pyx_v_group); __Pyx_XDECREF(__pyx_v_src); __Pyx_XDECREF(__pyx_v_zf); __Pyx_XDECREF(__pyx_v_badfile); __Pyx_XDECREF(__pyx_v_curdir); __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *__pyx_freelist_12turbozipfile___pyx_scope_struct___ZipDecrypter[8]; static int __pyx_freecount_12turbozipfile___pyx_scope_struct___ZipDecrypter = 0; static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct___ZipDecrypter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12turbozipfile___pyx_scope_struct___ZipDecrypter > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter)))) { o = (PyObject*)__pyx_freelist_12turbozipfile___pyx_scope_struct___ZipDecrypter[--__pyx_freecount_12turbozipfile___pyx_scope_struct___ZipDecrypter]; memset(o, 0, sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter)); (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_12turbozipfile___pyx_scope_struct___ZipDecrypter(PyObject *o) { struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_crc32); Py_CLEAR(p->__pyx_v_crctable); Py_CLEAR(p->__pyx_v_key0); Py_CLEAR(p->__pyx_v_key1); Py_CLEAR(p->__pyx_v_key2); Py_CLEAR(p->__pyx_v_update_keys); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12turbozipfile___pyx_scope_struct___ZipDecrypter < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter)))) { __pyx_freelist_12turbozipfile___pyx_scope_struct___ZipDecrypter[__pyx_freecount_12turbozipfile___pyx_scope_struct___ZipDecrypter++] = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_12turbozipfile___pyx_scope_struct___ZipDecrypter(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *)o; if (p->__pyx_v_crc32) { e = (*v)(p->__pyx_v_crc32, a); if (e) return e; } if (p->__pyx_v_crctable) { e = (*v)(p->__pyx_v_crctable, a); if (e) return e; } if (p->__pyx_v_key0) { e = (*v)(p->__pyx_v_key0, a); if (e) return e; } if (p->__pyx_v_key1) { e = (*v)(p->__pyx_v_key1, a); if (e) return e; } if (p->__pyx_v_key2) { e = (*v)(p->__pyx_v_key2, a); if (e) return e; } if (p->__pyx_v_update_keys) { e = (*v)(p->__pyx_v_update_keys, a); if (e) return e; } return 0; } static int __pyx_tp_clear_12turbozipfile___pyx_scope_struct___ZipDecrypter(PyObject *o) { PyObject* tmp; struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter *)o; tmp = ((PyObject*)p->__pyx_v_crc32); p->__pyx_v_crc32 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_crctable); p->__pyx_v_crctable = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_key0); p->__pyx_v_key0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_key1); p->__pyx_v_key1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_key2); p->__pyx_v_key2 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_update_keys); p->__pyx_v_update_keys = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_12turbozipfile___pyx_scope_struct___ZipDecrypter = { PyVarObject_HEAD_INIT(0, 0) "turbozipfile.__pyx_scope_struct___ZipDecrypter", sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct___ZipDecrypter), 0, __pyx_tp_dealloc_12turbozipfile___pyx_scope_struct___ZipDecrypter, #if PY_VERSION_HEX < 0x030800b4 0, #endif #if PY_VERSION_HEX >= 0x030800b4 0, #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #endif #if PY_MAJOR_VERSION >= 3 0, #endif 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, 0, __pyx_tp_traverse_12turbozipfile___pyx_scope_struct___ZipDecrypter, __pyx_tp_clear_12turbozipfile___pyx_scope_struct___ZipDecrypter, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __pyx_tp_new_12turbozipfile___pyx_scope_struct___ZipDecrypter, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #endif }; static struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *__pyx_freelist_12turbozipfile___pyx_scope_struct_1__extract_member[8]; static int __pyx_freecount_12turbozipfile___pyx_scope_struct_1__extract_member = 0; static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct_1__extract_member(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12turbozipfile___pyx_scope_struct_1__extract_member > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member)))) { o = (PyObject*)__pyx_freelist_12turbozipfile___pyx_scope_struct_1__extract_member[--__pyx_freecount_12turbozipfile___pyx_scope_struct_1__extract_member]; memset(o, 0, sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member)); (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_12turbozipfile___pyx_scope_struct_1__extract_member(PyObject *o) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_arcname); Py_CLEAR(p->__pyx_v_invalid_path_parts); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12turbozipfile___pyx_scope_struct_1__extract_member < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member)))) { __pyx_freelist_12turbozipfile___pyx_scope_struct_1__extract_member[__pyx_freecount_12turbozipfile___pyx_scope_struct_1__extract_member++] = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_12turbozipfile___pyx_scope_struct_1__extract_member(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *)o; if (p->__pyx_v_arcname) { e = (*v)(p->__pyx_v_arcname, a); if (e) return e; } if (p->__pyx_v_invalid_path_parts) { e = (*v)(p->__pyx_v_invalid_path_parts, a); if (e) return e; } return 0; } static int __pyx_tp_clear_12turbozipfile___pyx_scope_struct_1__extract_member(PyObject *o) { PyObject* tmp; struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member *)o; tmp = ((PyObject*)p->__pyx_v_arcname); p->__pyx_v_arcname = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_invalid_path_parts); p->__pyx_v_invalid_path_parts = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_12turbozipfile___pyx_scope_struct_1__extract_member = { PyVarObject_HEAD_INIT(0, 0) "turbozipfile.__pyx_scope_struct_1__extract_member", sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_1__extract_member), 0, __pyx_tp_dealloc_12turbozipfile___pyx_scope_struct_1__extract_member, #if PY_VERSION_HEX < 0x030800b4 0, #endif #if PY_VERSION_HEX >= 0x030800b4 0, #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #endif #if PY_MAJOR_VERSION >= 3 0, #endif 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, 0, __pyx_tp_traverse_12turbozipfile___pyx_scope_struct_1__extract_member, __pyx_tp_clear_12turbozipfile___pyx_scope_struct_1__extract_member, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __pyx_tp_new_12turbozipfile___pyx_scope_struct_1__extract_member, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #endif }; static struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *__pyx_freelist_12turbozipfile___pyx_scope_struct_2_genexpr[8]; static int __pyx_freecount_12turbozipfile___pyx_scope_struct_2_genexpr = 0; static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12turbozipfile___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr)))) { o = (PyObject*)__pyx_freelist_12turbozipfile___pyx_scope_struct_2_genexpr[--__pyx_freecount_12turbozipfile___pyx_scope_struct_2_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr)); (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_12turbozipfile___pyx_scope_struct_2_genexpr(PyObject *o) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_x); Py_CLEAR(p->__pyx_t_0); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12turbozipfile___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr)))) { __pyx_freelist_12turbozipfile___pyx_scope_struct_2_genexpr[__pyx_freecount_12turbozipfile___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_12turbozipfile___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_x) { e = (*v)(p->__pyx_v_x, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_12turbozipfile___pyx_scope_struct_2_genexpr = { PyVarObject_HEAD_INIT(0, 0) "turbozipfile.__pyx_scope_struct_2_genexpr", sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_2_genexpr), 0, __pyx_tp_dealloc_12turbozipfile___pyx_scope_struct_2_genexpr, #if PY_VERSION_HEX < 0x030800b4 0, #endif #if PY_VERSION_HEX >= 0x030800b4 0, #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #endif #if PY_MAJOR_VERSION >= 3 0, #endif 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, 0, __pyx_tp_traverse_12turbozipfile___pyx_scope_struct_2_genexpr, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __pyx_tp_new_12turbozipfile___pyx_scope_struct_2_genexpr, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #endif }; static struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *__pyx_freelist_12turbozipfile___pyx_scope_struct_3__ancestry[8]; static int __pyx_freecount_12turbozipfile___pyx_scope_struct_3__ancestry = 0; static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct_3__ancestry(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12turbozipfile___pyx_scope_struct_3__ancestry > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry)))) { o = (PyObject*)__pyx_freelist_12turbozipfile___pyx_scope_struct_3__ancestry[--__pyx_freecount_12turbozipfile___pyx_scope_struct_3__ancestry]; memset(o, 0, sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry)); (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_12turbozipfile___pyx_scope_struct_3__ancestry(PyObject *o) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_path); Py_CLEAR(p->__pyx_v_tail); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12turbozipfile___pyx_scope_struct_3__ancestry < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry)))) { __pyx_freelist_12turbozipfile___pyx_scope_struct_3__ancestry[__pyx_freecount_12turbozipfile___pyx_scope_struct_3__ancestry++] = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_12turbozipfile___pyx_scope_struct_3__ancestry(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry *)o; if (p->__pyx_v_path) { e = (*v)(p->__pyx_v_path, a); if (e) return e; } if (p->__pyx_v_tail) { e = (*v)(p->__pyx_v_tail, a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_12turbozipfile___pyx_scope_struct_3__ancestry = { PyVarObject_HEAD_INIT(0, 0) "turbozipfile.__pyx_scope_struct_3__ancestry", sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_3__ancestry), 0, __pyx_tp_dealloc_12turbozipfile___pyx_scope_struct_3__ancestry, #if PY_VERSION_HEX < 0x030800b4 0, #endif #if PY_VERSION_HEX >= 0x030800b4 0, #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #endif #if PY_MAJOR_VERSION >= 3 0, #endif 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, 0, __pyx_tp_traverse_12turbozipfile___pyx_scope_struct_3__ancestry, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __pyx_tp_new_12turbozipfile___pyx_scope_struct_3__ancestry, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #endif }; static struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *__pyx_freelist_12turbozipfile___pyx_scope_struct_4__implied_dirs[8]; static int __pyx_freecount_12turbozipfile___pyx_scope_struct_4__implied_dirs = 0; static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct_4__implied_dirs(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12turbozipfile___pyx_scope_struct_4__implied_dirs > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs)))) { o = (PyObject*)__pyx_freelist_12turbozipfile___pyx_scope_struct_4__implied_dirs[--__pyx_freecount_12turbozipfile___pyx_scope_struct_4__implied_dirs]; memset(o, 0, sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs)); (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_12turbozipfile___pyx_scope_struct_4__implied_dirs(PyObject *o) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_parents); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12turbozipfile___pyx_scope_struct_4__implied_dirs < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs)))) { __pyx_freelist_12turbozipfile___pyx_scope_struct_4__implied_dirs[__pyx_freecount_12turbozipfile___pyx_scope_struct_4__implied_dirs++] = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_12turbozipfile___pyx_scope_struct_4__implied_dirs(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *)o; if (p->__pyx_v_parents) { e = (*v)(p->__pyx_v_parents, a); if (e) return e; } return 0; } static int __pyx_tp_clear_12turbozipfile___pyx_scope_struct_4__implied_dirs(PyObject *o) { PyObject* tmp; struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs *)o; tmp = ((PyObject*)p->__pyx_v_parents); p->__pyx_v_parents = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_12turbozipfile___pyx_scope_struct_4__implied_dirs = { PyVarObject_HEAD_INIT(0, 0) "turbozipfile.__pyx_scope_struct_4__implied_dirs", sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_4__implied_dirs), 0, __pyx_tp_dealloc_12turbozipfile___pyx_scope_struct_4__implied_dirs, #if PY_VERSION_HEX < 0x030800b4 0, #endif #if PY_VERSION_HEX >= 0x030800b4 0, #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #endif #if PY_MAJOR_VERSION >= 3 0, #endif 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, 0, __pyx_tp_traverse_12turbozipfile___pyx_scope_struct_4__implied_dirs, __pyx_tp_clear_12turbozipfile___pyx_scope_struct_4__implied_dirs, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __pyx_tp_new_12turbozipfile___pyx_scope_struct_4__implied_dirs, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #endif }; static struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *__pyx_freelist_12turbozipfile___pyx_scope_struct_5_genexpr[8]; static int __pyx_freecount_12turbozipfile___pyx_scope_struct_5_genexpr = 0; static PyObject *__pyx_tp_new_12turbozipfile___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12turbozipfile___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr)))) { o = (PyObject*)__pyx_freelist_12turbozipfile___pyx_scope_struct_5_genexpr[--__pyx_freecount_12turbozipfile___pyx_scope_struct_5_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr)); (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_12turbozipfile___pyx_scope_struct_5_genexpr(PyObject *o) { struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_p); Py_CLEAR(p->__pyx_t_0); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12turbozipfile___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr)))) { __pyx_freelist_12turbozipfile___pyx_scope_struct_5_genexpr[__pyx_freecount_12turbozipfile___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_12turbozipfile___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_p) { e = (*v)(p->__pyx_v_p, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_12turbozipfile___pyx_scope_struct_5_genexpr = { PyVarObject_HEAD_INIT(0, 0) "turbozipfile.__pyx_scope_struct_5_genexpr", sizeof(struct __pyx_obj_12turbozipfile___pyx_scope_struct_5_genexpr), 0, __pyx_tp_dealloc_12turbozipfile___pyx_scope_struct_5_genexpr, #if PY_VERSION_HEX < 0x030800b4 0, #endif #if PY_VERSION_HEX >= 0x030800b4 0, #endif 0, 0, #if PY_MAJOR_VERSION < 3 0, #endif #if PY_MAJOR_VERSION >= 3 0, #endif 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, 0, __pyx_tp_traverse_12turbozipfile___pyx_scope_struct_5_genexpr, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __pyx_tp_new_12turbozipfile___pyx_scope_struct_5_genexpr, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #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); static int __pyx_pymod_exec_turbozipfile(PyObject* module); static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_turbozipfile}, {0, NULL} }; #endif static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, "turbozipfile", __pyx_k_Read_and_write_ZIP_files, #if CYTHON_PEP489_MULTI_PHASE_INIT 0, #else -1, #endif __pyx_methods , #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, #else NULL, #endif NULL, NULL, NULL }; #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_b_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 0, 0}, {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0}, {&__pyx_kp_u_04x, __pyx_k_04x, sizeof(__pyx_k_04x), 0, 1, 0, 0}, {&__pyx_kp_u_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 1, 0, 0}, {&__pyx_kp_u_12d, __pyx_k_12d, sizeof(__pyx_k_12d), 0, 1, 0, 0}, {&__pyx_kp_u_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 1, 0, 0}, {&__pyx_kp_u_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 1, 0, 0}, {&__pyx_kp_u_4s2B4HL2L2H, __pyx_k_4s2B4HL2L2H, sizeof(__pyx_k_4s2B4HL2L2H), 0, 1, 0, 0}, {&__pyx_kp_u_4s4B4HL2L5H2L, __pyx_k_4s4B4HL2L5H2L, sizeof(__pyx_k_4s4B4HL2L5H2L), 0, 1, 0, 0}, {&__pyx_kp_b_4s4H2LH, __pyx_k_4s4H2LH, sizeof(__pyx_k_4s4H2LH), 0, 0, 0, 0}, {&__pyx_kp_u_4sLQL, __pyx_k_4sLQL, sizeof(__pyx_k_4sLQL), 0, 1, 0, 0}, {&__pyx_kp_u_4sQ2H2L4Q, __pyx_k_4sQ2H2L4Q, sizeof(__pyx_k_4sQ2H2L4Q), 0, 1, 0, 0}, {&__pyx_kp_s_A_ZipFile_subclass_that_ensures, __pyx_k_A_ZipFile_subclass_that_ensures, sizeof(__pyx_k_A_ZipFile_subclass_that_ensures), 0, 0, 1, 0}, {&__pyx_kp_s_A_pathlib_compatible_interface, __pyx_k_A_pathlib_compatible_interface, sizeof(__pyx_k_A_pathlib_compatible_interface), 0, 0, 1, 0}, {&__pyx_kp_u_A_simple_command_line_interface, __pyx_k_A_simple_command_line_interface, sizeof(__pyx_k_A_simple_command_line_interface), 0, 1, 0, 0}, {&__pyx_kp_u_Archive_comment_is_too_long_trun, __pyx_k_Archive_comment_is_too_long_trun, sizeof(__pyx_k_Archive_comment_is_too_long_trun), 0, 1, 0, 0}, {&__pyx_n_s_ArgumentParser, __pyx_k_ArgumentParser, sizeof(__pyx_k_ArgumentParser), 0, 0, 1, 1}, {&__pyx_kp_u_Attempt_to_use_ZIP_archive_that, __pyx_k_Attempt_to_use_ZIP_archive_that, sizeof(__pyx_k_Attempt_to_use_ZIP_archive_that), 0, 1, 0, 0}, {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, {&__pyx_kp_u_BBH, __pyx_k_BBH, sizeof(__pyx_k_BBH), 0, 1, 0, 0}, {&__pyx_n_s_BZ2Compressor, __pyx_k_BZ2Compressor, sizeof(__pyx_k_BZ2Compressor), 0, 0, 1, 1}, {&__pyx_n_s_BZ2Decompressor, __pyx_k_BZ2Decompressor, sizeof(__pyx_k_BZ2Decompressor), 0, 0, 1, 1}, {&__pyx_n_s_BZIP2_VERSION, __pyx_k_BZIP2_VERSION, sizeof(__pyx_k_BZIP2_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_BadZipFile, __pyx_k_BadZipFile, sizeof(__pyx_k_BadZipFile), 0, 0, 1, 1}, {&__pyx_n_u_BadZipFile, __pyx_k_BadZipFile, sizeof(__pyx_k_BadZipFile), 0, 1, 0, 1}, {&__pyx_n_s_BadZipfile, __pyx_k_BadZipfile, sizeof(__pyx_k_BadZipfile), 0, 0, 1, 1}, {&__pyx_n_u_BadZipfile, __pyx_k_BadZipfile, sizeof(__pyx_k_BadZipfile), 0, 1, 0, 1}, {&__pyx_kp_u_Bad_CRC_32_for_file_r, __pyx_k_Bad_CRC_32_for_file_r, sizeof(__pyx_k_Bad_CRC_32_for_file_r), 0, 1, 0, 0}, {&__pyx_kp_u_Bad_magic_number_for_central_dir, __pyx_k_Bad_magic_number_for_central_dir, sizeof(__pyx_k_Bad_magic_number_for_central_dir), 0, 1, 0, 0}, {&__pyx_kp_u_Bad_magic_number_for_file_header, __pyx_k_Bad_magic_number_for_file_header, sizeof(__pyx_k_Bad_magic_number_for_file_header), 0, 1, 0, 0}, {&__pyx_kp_u_Bad_password_for_file_r, __pyx_k_Bad_password_for_file_r, sizeof(__pyx_k_Bad_password_for_file_r), 0, 1, 0, 0}, {&__pyx_n_s_BufferedIOBase, __pyx_k_BufferedIOBase, sizeof(__pyx_k_BufferedIOBase), 0, 0, 1, 1}, {&__pyx_n_s_BytesIO, __pyx_k_BytesIO, sizeof(__pyx_k_BytesIO), 0, 0, 1, 1}, {&__pyx_n_s_CD64_CREATE_VERSION, __pyx_k_CD64_CREATE_VERSION, sizeof(__pyx_k_CD64_CREATE_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_CD64_DIRECTORY_RECSIZE, __pyx_k_CD64_DIRECTORY_RECSIZE, sizeof(__pyx_k_CD64_DIRECTORY_RECSIZE), 0, 0, 1, 1}, {&__pyx_n_s_CD64_DIRECTORY_SIZE, __pyx_k_CD64_DIRECTORY_SIZE, sizeof(__pyx_k_CD64_DIRECTORY_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_CD64_DISK_NUMBER, __pyx_k_CD64_DISK_NUMBER, sizeof(__pyx_k_CD64_DISK_NUMBER), 0, 0, 1, 1}, {&__pyx_n_s_CD64_DISK_NUMBER_START, __pyx_k_CD64_DISK_NUMBER_START, sizeof(__pyx_k_CD64_DISK_NUMBER_START), 0, 0, 1, 1}, {&__pyx_n_s_CD64_EXTRACT_VERSION, __pyx_k_CD64_EXTRACT_VERSION, sizeof(__pyx_k_CD64_EXTRACT_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_CD64_NUMBER_ENTRIES_THIS_DISK, __pyx_k_CD64_NUMBER_ENTRIES_THIS_DISK, sizeof(__pyx_k_CD64_NUMBER_ENTRIES_THIS_DISK), 0, 0, 1, 1}, {&__pyx_n_s_CD64_NUMBER_ENTRIES_TOTAL, __pyx_k_CD64_NUMBER_ENTRIES_TOTAL, sizeof(__pyx_k_CD64_NUMBER_ENTRIES_TOTAL), 0, 0, 1, 1}, {&__pyx_n_s_CD64_OFFSET_START_CENTDIR, __pyx_k_CD64_OFFSET_START_CENTDIR, sizeof(__pyx_k_CD64_OFFSET_START_CENTDIR), 0, 0, 1, 1}, {&__pyx_n_s_CD64_SIGNATURE, __pyx_k_CD64_SIGNATURE, sizeof(__pyx_k_CD64_SIGNATURE), 0, 0, 1, 1}, {&__pyx_n_s_CD_COMMENT_LENGTH, __pyx_k_CD_COMMENT_LENGTH, sizeof(__pyx_k_CD_COMMENT_LENGTH), 0, 0, 1, 1}, {&__pyx_n_s_CD_COMPRESSED_SIZE, __pyx_k_CD_COMPRESSED_SIZE, sizeof(__pyx_k_CD_COMPRESSED_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_CD_COMPRESS_TYPE, __pyx_k_CD_COMPRESS_TYPE, sizeof(__pyx_k_CD_COMPRESS_TYPE), 0, 0, 1, 1}, {&__pyx_n_s_CD_CRC, __pyx_k_CD_CRC, sizeof(__pyx_k_CD_CRC), 0, 0, 1, 1}, {&__pyx_n_s_CD_CREATE_SYSTEM, __pyx_k_CD_CREATE_SYSTEM, sizeof(__pyx_k_CD_CREATE_SYSTEM), 0, 0, 1, 1}, {&__pyx_n_s_CD_CREATE_VERSION, __pyx_k_CD_CREATE_VERSION, sizeof(__pyx_k_CD_CREATE_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_CD_DATE, __pyx_k_CD_DATE, sizeof(__pyx_k_CD_DATE), 0, 0, 1, 1}, {&__pyx_n_s_CD_DISK_NUMBER_START, __pyx_k_CD_DISK_NUMBER_START, sizeof(__pyx_k_CD_DISK_NUMBER_START), 0, 0, 1, 1}, {&__pyx_n_s_CD_EXTERNAL_FILE_ATTRIBUTES, __pyx_k_CD_EXTERNAL_FILE_ATTRIBUTES, sizeof(__pyx_k_CD_EXTERNAL_FILE_ATTRIBUTES), 0, 0, 1, 1}, {&__pyx_n_s_CD_EXTRACT_SYSTEM, __pyx_k_CD_EXTRACT_SYSTEM, sizeof(__pyx_k_CD_EXTRACT_SYSTEM), 0, 0, 1, 1}, {&__pyx_n_s_CD_EXTRACT_VERSION, __pyx_k_CD_EXTRACT_VERSION, sizeof(__pyx_k_CD_EXTRACT_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_CD_EXTRA_FIELD_LENGTH, __pyx_k_CD_EXTRA_FIELD_LENGTH, sizeof(__pyx_k_CD_EXTRA_FIELD_LENGTH), 0, 0, 1, 1}, {&__pyx_n_s_CD_FILENAME_LENGTH, __pyx_k_CD_FILENAME_LENGTH, sizeof(__pyx_k_CD_FILENAME_LENGTH), 0, 0, 1, 1}, {&__pyx_n_s_CD_FLAG_BITS, __pyx_k_CD_FLAG_BITS, sizeof(__pyx_k_CD_FLAG_BITS), 0, 0, 1, 1}, {&__pyx_n_s_CD_INTERNAL_FILE_ATTRIBUTES, __pyx_k_CD_INTERNAL_FILE_ATTRIBUTES, sizeof(__pyx_k_CD_INTERNAL_FILE_ATTRIBUTES), 0, 0, 1, 1}, {&__pyx_n_s_CD_LOCAL_HEADER_OFFSET, __pyx_k_CD_LOCAL_HEADER_OFFSET, sizeof(__pyx_k_CD_LOCAL_HEADER_OFFSET), 0, 0, 1, 1}, {&__pyx_n_s_CD_SIGNATURE, __pyx_k_CD_SIGNATURE, sizeof(__pyx_k_CD_SIGNATURE), 0, 0, 1, 1}, {&__pyx_n_s_CD_TIME, __pyx_k_CD_TIME, sizeof(__pyx_k_CD_TIME), 0, 0, 1, 1}, {&__pyx_n_s_CD_UNCOMPRESSED_SIZE, __pyx_k_CD_UNCOMPRESSED_SIZE, sizeof(__pyx_k_CD_UNCOMPRESSED_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_CRC, __pyx_k_CRC, sizeof(__pyx_k_CRC), 0, 0, 1, 1}, {&__pyx_n_u_CRC, __pyx_k_CRC, sizeof(__pyx_k_CRC), 0, 1, 0, 1}, {&__pyx_kp_u_Can_t_listdir_a_file, __pyx_k_Can_t_listdir_a_file, sizeof(__pyx_k_Can_t_listdir_a_file), 0, 1, 0, 0}, {&__pyx_kp_s_Class_with_attributes_describing, __pyx_k_Class_with_attributes_describing, sizeof(__pyx_k_Class_with_attributes_describing), 0, 0, 1, 0}, {&__pyx_kp_s_Class_with_methods_to_open_read, __pyx_k_Class_with_methods_to_open_read, sizeof(__pyx_k_Class_with_methods_to_open_read), 0, 0, 1, 0}, {&__pyx_n_s_CompleteDirs, __pyx_k_CompleteDirs, sizeof(__pyx_k_CompleteDirs), 0, 0, 1, 1}, {&__pyx_n_s_CompleteDirs__implied_dirs, __pyx_k_CompleteDirs__implied_dirs, sizeof(__pyx_k_CompleteDirs__implied_dirs), 0, 0, 1, 1}, {&__pyx_n_s_CompleteDirs__implied_dirs_local, __pyx_k_CompleteDirs__implied_dirs_local, sizeof(__pyx_k_CompleteDirs__implied_dirs_local), 0, 0, 1, 1}, {&__pyx_n_s_CompleteDirs__name_set, __pyx_k_CompleteDirs__name_set, sizeof(__pyx_k_CompleteDirs__name_set), 0, 0, 1, 1}, {&__pyx_n_s_CompleteDirs_make, __pyx_k_CompleteDirs_make, sizeof(__pyx_k_CompleteDirs_make), 0, 0, 1, 1}, {&__pyx_n_s_CompleteDirs_namelist, __pyx_k_CompleteDirs_namelist, sizeof(__pyx_k_CompleteDirs_namelist), 0, 0, 1, 1}, {&__pyx_n_s_CompleteDirs_resolve_dir, __pyx_k_CompleteDirs_resolve_dir, sizeof(__pyx_k_CompleteDirs_resolve_dir), 0, 0, 1, 1}, {&__pyx_kp_u_Compress_size, __pyx_k_Compress_size, sizeof(__pyx_k_Compress_size), 0, 1, 0, 0}, {&__pyx_kp_u_Compression_requires_the_missing, __pyx_k_Compression_requires_the_missing, sizeof(__pyx_k_Compression_requires_the_missing), 0, 1, 0, 0}, {&__pyx_kp_u_Compression_requires_the_missing_2, __pyx_k_Compression_requires_the_missing_2, sizeof(__pyx_k_Compression_requires_the_missing_2), 0, 1, 0, 0}, {&__pyx_kp_u_Compression_requires_the_missing_3, __pyx_k_Compression_requires_the_missing_3, sizeof(__pyx_k_Compression_requires_the_missing_3), 0, 1, 0, 0}, {&__pyx_kp_u_Corrupt_extra_field, __pyx_k_Corrupt_extra_field, sizeof(__pyx_k_Corrupt_extra_field), 0, 1, 0, 0}, {&__pyx_kp_u_Corrupt_zip64_extra_field, __pyx_k_Corrupt_zip64_extra_field, sizeof(__pyx_k_Corrupt_zip64_extra_field), 0, 1, 0, 0}, {&__pyx_n_s_DD_SIGNATURE, __pyx_k_DD_SIGNATURE, sizeof(__pyx_k_DD_SIGNATURE), 0, 0, 1, 1}, {&__pyx_n_s_DEFAULT_VERSION, __pyx_k_DEFAULT_VERSION, sizeof(__pyx_k_DEFAULT_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_DEFLATED, __pyx_k_DEFLATED, sizeof(__pyx_k_DEFLATED), 0, 0, 1, 1}, {&__pyx_kp_u_Done_testing, __pyx_k_Done_testing, sizeof(__pyx_k_Done_testing), 0, 1, 0, 0}, {&__pyx_n_s_ECD_COMMENT, __pyx_k_ECD_COMMENT, sizeof(__pyx_k_ECD_COMMENT), 0, 0, 1, 1}, {&__pyx_n_s_ECD_COMMENT_SIZE, __pyx_k_ECD_COMMENT_SIZE, sizeof(__pyx_k_ECD_COMMENT_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_ECD_DISK_NUMBER, __pyx_k_ECD_DISK_NUMBER, sizeof(__pyx_k_ECD_DISK_NUMBER), 0, 0, 1, 1}, {&__pyx_n_s_ECD_DISK_START, __pyx_k_ECD_DISK_START, sizeof(__pyx_k_ECD_DISK_START), 0, 0, 1, 1}, {&__pyx_n_s_ECD_ENTRIES_THIS_DISK, __pyx_k_ECD_ENTRIES_THIS_DISK, sizeof(__pyx_k_ECD_ENTRIES_THIS_DISK), 0, 0, 1, 1}, {&__pyx_n_s_ECD_ENTRIES_TOTAL, __pyx_k_ECD_ENTRIES_TOTAL, sizeof(__pyx_k_ECD_ENTRIES_TOTAL), 0, 0, 1, 1}, {&__pyx_n_s_ECD_LOCATION, __pyx_k_ECD_LOCATION, sizeof(__pyx_k_ECD_LOCATION), 0, 0, 1, 1}, {&__pyx_n_s_ECD_OFFSET, __pyx_k_ECD_OFFSET, sizeof(__pyx_k_ECD_OFFSET), 0, 0, 1, 1}, {&__pyx_n_s_ECD_SIGNATURE, __pyx_k_ECD_SIGNATURE, sizeof(__pyx_k_ECD_SIGNATURE), 0, 0, 1, 1}, {&__pyx_n_s_ECD_SIZE, __pyx_k_ECD_SIZE, sizeof(__pyx_k_ECD_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_EOFError, __pyx_k_EOFError, sizeof(__pyx_k_EOFError), 0, 0, 1, 1}, {&__pyx_n_s_EXTRA_FIELD_STRUCT, __pyx_k_EXTRA_FIELD_STRUCT, sizeof(__pyx_k_EXTRA_FIELD_STRUCT), 0, 0, 1, 1}, {&__pyx_n_s_EndRecData, __pyx_k_EndRecData, sizeof(__pyx_k_EndRecData), 0, 0, 1, 1}, {&__pyx_n_s_EndRecData64, __pyx_k_EndRecData64, sizeof(__pyx_k_EndRecData64), 0, 0, 1, 1}, {&__pyx_kp_u_Extract_zipfile_into_target_dir, __pyx_k_Extract_zipfile_into_target_dir, sizeof(__pyx_k_Extract_zipfile_into_target_dir), 0, 1, 0, 0}, {&__pyx_n_s_FH_COMPRESSED_SIZE, __pyx_k_FH_COMPRESSED_SIZE, sizeof(__pyx_k_FH_COMPRESSED_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_FH_COMPRESSION_METHOD, __pyx_k_FH_COMPRESSION_METHOD, sizeof(__pyx_k_FH_COMPRESSION_METHOD), 0, 0, 1, 1}, {&__pyx_n_s_FH_CRC, __pyx_k_FH_CRC, sizeof(__pyx_k_FH_CRC), 0, 0, 1, 1}, {&__pyx_n_s_FH_EXTRACT_SYSTEM, __pyx_k_FH_EXTRACT_SYSTEM, sizeof(__pyx_k_FH_EXTRACT_SYSTEM), 0, 0, 1, 1}, {&__pyx_n_s_FH_EXTRACT_VERSION, __pyx_k_FH_EXTRACT_VERSION, sizeof(__pyx_k_FH_EXTRACT_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_FH_EXTRA_FIELD_LENGTH, __pyx_k_FH_EXTRA_FIELD_LENGTH, sizeof(__pyx_k_FH_EXTRA_FIELD_LENGTH), 0, 0, 1, 1}, {&__pyx_n_s_FH_FILENAME_LENGTH, __pyx_k_FH_FILENAME_LENGTH, sizeof(__pyx_k_FH_FILENAME_LENGTH), 0, 0, 1, 1}, {&__pyx_n_s_FH_GENERAL_PURPOSE_FLAG_BITS, __pyx_k_FH_GENERAL_PURPOSE_FLAG_BITS, sizeof(__pyx_k_FH_GENERAL_PURPOSE_FLAG_BITS), 0, 0, 1, 1}, {&__pyx_n_s_FH_LAST_MOD_DATE, __pyx_k_FH_LAST_MOD_DATE, sizeof(__pyx_k_FH_LAST_MOD_DATE), 0, 0, 1, 1}, {&__pyx_n_s_FH_LAST_MOD_TIME, __pyx_k_FH_LAST_MOD_TIME, sizeof(__pyx_k_FH_LAST_MOD_TIME), 0, 0, 1, 1}, {&__pyx_n_s_FH_SIGNATURE, __pyx_k_FH_SIGNATURE, sizeof(__pyx_k_FH_SIGNATURE), 0, 0, 1, 1}, {&__pyx_n_s_FH_UNCOMPRESSED_SIZE, __pyx_k_FH_UNCOMPRESSED_SIZE, sizeof(__pyx_k_FH_UNCOMPRESSED_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_FILTER_LZMA1, __pyx_k_FILTER_LZMA1, sizeof(__pyx_k_FILTER_LZMA1), 0, 0, 1, 1}, {&__pyx_n_s_FORMAT_RAW, __pyx_k_FORMAT_RAW, sizeof(__pyx_k_FORMAT_RAW), 0, 0, 1, 1}, {&__pyx_n_s_FastLookup, __pyx_k_FastLookup, sizeof(__pyx_k_FastLookup), 0, 0, 1, 1}, {&__pyx_n_s_FastLookup__lookup, __pyx_k_FastLookup__lookup, sizeof(__pyx_k_FastLookup__lookup), 0, 0, 1, 1}, {&__pyx_n_s_FastLookup__name_set, __pyx_k_FastLookup__name_set, sizeof(__pyx_k_FastLookup__name_set), 0, 0, 1, 1}, {&__pyx_n_s_FastLookup__names, __pyx_k_FastLookup__names, sizeof(__pyx_k_FastLookup__names), 0, 0, 1, 1}, {&__pyx_n_s_FastLookup_namelist, __pyx_k_FastLookup_namelist, sizeof(__pyx_k_FastLookup_namelist), 0, 0, 1, 1}, {&__pyx_kp_u_File_Name, __pyx_k_File_Name, sizeof(__pyx_k_File_Name), 0, 1, 0, 0}, {&__pyx_kp_u_File_is_not_a_zip_file, __pyx_k_File_is_not_a_zip_file, sizeof(__pyx_k_File_is_not_a_zip_file), 0, 1, 0, 0}, {&__pyx_kp_s_File_like_object_for_reading_an, __pyx_k_File_like_object_for_reading_an, sizeof(__pyx_k_File_like_object_for_reading_an), 0, 0, 1, 0}, {&__pyx_kp_u_File_name_in_directory, __pyx_k_File_name_in_directory, sizeof(__pyx_k_File_name_in_directory), 0, 1, 0, 0}, {&__pyx_kp_u_File_r_is_encrypted_password_req, __pyx_k_File_r_is_encrypted_password_req, sizeof(__pyx_k_File_r_is_encrypted_password_req), 0, 1, 0, 0}, {&__pyx_kp_u_File_size, __pyx_k_File_size, sizeof(__pyx_k_File_size), 0, 1, 0, 0}, {&__pyx_kp_u_Given_a_path_with_elements_sepa, __pyx_k_Given_a_path_with_elements_sepa, sizeof(__pyx_k_Given_a_path_with_elements_sepa), 0, 1, 0, 0}, {&__pyx_kp_u_Given_a_path_with_elements_sepa_2, __pyx_k_Given_a_path_with_elements_sepa_2, sizeof(__pyx_k_Given_a_path_with_elements_sepa_2), 0, 1, 0, 0}, {&__pyx_kp_u_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 1, 0, 0}, {&__pyx_kp_u_HH, __pyx_k_HH, sizeof(__pyx_k_HH), 0, 1, 0, 0}, {&__pyx_kp_u_Header_offset, __pyx_k_Header_offset, sizeof(__pyx_k_Header_offset), 0, 1, 0, 0}, {&__pyx_kp_u_I_O_operation_on_closed_file, __pyx_k_I_O_operation_on_closed_file, sizeof(__pyx_k_I_O_operation_on_closed_file), 0, 1, 0, 0}, {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, {&__pyx_n_s_LZMACompressor, __pyx_k_LZMACompressor, sizeof(__pyx_k_LZMACompressor), 0, 0, 1, 1}, {&__pyx_n_s_LZMACompressor___init, __pyx_k_LZMACompressor___init, sizeof(__pyx_k_LZMACompressor___init), 0, 0, 1, 1}, {&__pyx_n_s_LZMACompressor__init, __pyx_k_LZMACompressor__init, sizeof(__pyx_k_LZMACompressor__init), 0, 0, 1, 1}, {&__pyx_n_s_LZMACompressor_compress, __pyx_k_LZMACompressor_compress, sizeof(__pyx_k_LZMACompressor_compress), 0, 0, 1, 1}, {&__pyx_n_s_LZMACompressor_flush, __pyx_k_LZMACompressor_flush, sizeof(__pyx_k_LZMACompressor_flush), 0, 0, 1, 1}, {&__pyx_n_s_LZMADecompressor, __pyx_k_LZMADecompressor, sizeof(__pyx_k_LZMADecompressor), 0, 0, 1, 1}, {&__pyx_n_s_LZMADecompressor___init, __pyx_k_LZMADecompressor___init, sizeof(__pyx_k_LZMADecompressor___init), 0, 0, 1, 1}, {&__pyx_n_s_LZMADecompressor_decompress, __pyx_k_LZMADecompressor_decompress, sizeof(__pyx_k_LZMADecompressor_decompress), 0, 0, 1, 1}, {&__pyx_n_s_LZMA_VERSION, __pyx_k_LZMA_VERSION, sizeof(__pyx_k_LZMA_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_LargeZipFile, __pyx_k_LargeZipFile, sizeof(__pyx_k_LargeZipFile), 0, 0, 1, 1}, {&__pyx_n_u_LargeZipFile, __pyx_k_LargeZipFile, sizeof(__pyx_k_LargeZipFile), 0, 1, 0, 1}, {&__pyx_n_s_MAX_EXTRACT_VERSION, __pyx_k_MAX_EXTRACT_VERSION, sizeof(__pyx_k_MAX_EXTRACT_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_MAX_N, __pyx_k_MAX_N, sizeof(__pyx_k_MAX_N), 0, 0, 1, 1}, {&__pyx_n_s_MAX_SEEK_READ, __pyx_k_MAX_SEEK_READ, sizeof(__pyx_k_MAX_SEEK_READ), 0, 0, 1, 1}, {&__pyx_n_s_MIN_READ_SIZE, __pyx_k_MIN_READ_SIZE, sizeof(__pyx_k_MIN_READ_SIZE), 0, 0, 1, 1}, {&__pyx_kp_u_Modified, __pyx_k_Modified, sizeof(__pyx_k_Modified), 0, 1, 0, 0}, {&__pyx_n_s_NameToInfo, __pyx_k_NameToInfo, sizeof(__pyx_k_NameToInfo), 0, 0, 1, 1}, {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1}, {&__pyx_kp_b_PK, __pyx_k_PK, sizeof(__pyx_k_PK), 0, 0, 0, 0}, {&__pyx_kp_b_PK_2, __pyx_k_PK_2, sizeof(__pyx_k_PK_2), 0, 0, 0, 0}, {&__pyx_kp_b_PK_3, __pyx_k_PK_3, sizeof(__pyx_k_PK_3), 0, 0, 0, 0}, {&__pyx_kp_b_PK_4, __pyx_k_PK_4, sizeof(__pyx_k_PK_4), 0, 0, 0, 0}, {&__pyx_kp_b_PK_5, __pyx_k_PK_5, sizeof(__pyx_k_PK_5), 0, 0, 0, 0}, {&__pyx_n_s_Path, __pyx_k_Path, sizeof(__pyx_k_Path), 0, 0, 1, 1}, {&__pyx_n_u_Path, __pyx_k_Path, sizeof(__pyx_k_Path), 0, 1, 0, 1}, {&__pyx_n_s_PathLike, __pyx_k_PathLike, sizeof(__pyx_k_PathLike), 0, 0, 1, 1}, {&__pyx_n_s_Path___init, __pyx_k_Path___init, sizeof(__pyx_k_Path___init), 0, 0, 1, 1}, {&__pyx_n_s_Path___repr, __pyx_k_Path___repr, sizeof(__pyx_k_Path___repr), 0, 0, 1, 1}, {&__pyx_n_s_Path___str, __pyx_k_Path___str, sizeof(__pyx_k_Path___str), 0, 0, 1, 1}, {&__pyx_n_s_Path__is_child, __pyx_k_Path__is_child, sizeof(__pyx_k_Path__is_child), 0, 0, 1, 1}, {&__pyx_n_s_Path__next, __pyx_k_Path__next, sizeof(__pyx_k_Path__next), 0, 0, 1, 1}, {&__pyx_n_s_Path__repr, __pyx_k_Path__repr, sizeof(__pyx_k_Path__repr), 0, 0, 1, 1}, {&__pyx_n_s_Path_exists, __pyx_k_Path_exists, sizeof(__pyx_k_Path_exists), 0, 0, 1, 1}, {&__pyx_n_s_Path_is_dir, __pyx_k_Path_is_dir, sizeof(__pyx_k_Path_is_dir), 0, 0, 1, 1}, {&__pyx_n_s_Path_is_file, __pyx_k_Path_is_file, sizeof(__pyx_k_Path_is_file), 0, 0, 1, 1}, {&__pyx_n_s_Path_iterdir, __pyx_k_Path_iterdir, sizeof(__pyx_k_Path_iterdir), 0, 0, 1, 1}, {&__pyx_n_s_Path_joinpath, __pyx_k_Path_joinpath, sizeof(__pyx_k_Path_joinpath), 0, 0, 1, 1}, {&__pyx_n_s_Path_name, __pyx_k_Path_name, sizeof(__pyx_k_Path_name), 0, 0, 1, 1}, {&__pyx_n_s_Path_open, __pyx_k_Path_open, sizeof(__pyx_k_Path_open), 0, 0, 1, 1}, {&__pyx_n_s_Path_parent, __pyx_k_Path_parent, sizeof(__pyx_k_Path_parent), 0, 0, 1, 1}, {&__pyx_n_s_Path_read_bytes, __pyx_k_Path_read_bytes, sizeof(__pyx_k_Path_read_bytes), 0, 0, 1, 1}, {&__pyx_n_s_Path_read_text, __pyx_k_Path_read_text, sizeof(__pyx_k_Path_read_text), 0, 0, 1, 1}, {&__pyx_n_u_PyZipFile, __pyx_k_PyZipFile, sizeof(__pyx_k_PyZipFile), 0, 1, 0, 1}, {&__pyx_kp_u_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 1, 0, 0}, {&__pyx_n_s_RLock, __pyx_k_RLock, sizeof(__pyx_k_RLock), 0, 0, 1, 1}, {&__pyx_kp_s_Raised_when_writing_a_zipfile_t, __pyx_k_Raised_when_writing_a_zipfile_t, sizeof(__pyx_k_Raised_when_writing_a_zipfile_t), 0, 0, 1, 0}, {&__pyx_n_s_RealGetContents, __pyx_k_RealGetContents, sizeof(__pyx_k_RealGetContents), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_SharedFile, __pyx_k_SharedFile, sizeof(__pyx_k_SharedFile), 0, 0, 1, 1}, {&__pyx_n_s_SharedFile___init, __pyx_k_SharedFile___init, sizeof(__pyx_k_SharedFile___init), 0, 0, 1, 1}, {&__pyx_n_s_SharedFile_close, __pyx_k_SharedFile_close, sizeof(__pyx_k_SharedFile_close), 0, 0, 1, 1}, {&__pyx_n_s_SharedFile_read, __pyx_k_SharedFile_read, sizeof(__pyx_k_SharedFile_read), 0, 0, 1, 1}, {&__pyx_n_s_SharedFile_seek, __pyx_k_SharedFile_seek, sizeof(__pyx_k_SharedFile_seek), 0, 0, 1, 1}, {&__pyx_kp_u_Show_listing_of_a_zipfile, __pyx_k_Show_listing_of_a_zipfile, sizeof(__pyx_k_Show_listing_of_a_zipfile), 0, 1, 0, 0}, {&__pyx_n_u_Size, __pyx_k_Size, sizeof(__pyx_k_Size), 0, 1, 0, 1}, {&__pyx_n_s_Struct, __pyx_k_Struct, sizeof(__pyx_k_Struct), 0, 0, 1, 1}, {&__pyx_n_s_Tellable, __pyx_k_Tellable, sizeof(__pyx_k_Tellable), 0, 0, 1, 1}, {&__pyx_n_s_Tellable___init, __pyx_k_Tellable___init, sizeof(__pyx_k_Tellable___init), 0, 0, 1, 1}, {&__pyx_n_s_Tellable_close, __pyx_k_Tellable_close, sizeof(__pyx_k_Tellable_close), 0, 0, 1, 1}, {&__pyx_n_s_Tellable_flush, __pyx_k_Tellable_flush, sizeof(__pyx_k_Tellable_flush), 0, 0, 1, 1}, {&__pyx_n_s_Tellable_tell, __pyx_k_Tellable_tell, sizeof(__pyx_k_Tellable_tell), 0, 0, 1, 1}, {&__pyx_n_s_Tellable_write, __pyx_k_Tellable_write, sizeof(__pyx_k_Tellable_write), 0, 0, 1, 1}, {&__pyx_kp_u_Test_if_a_zipfile_is_valid, __pyx_k_Test_if_a_zipfile_is_valid, sizeof(__pyx_k_Test_if_a_zipfile_is_valid), 0, 1, 0, 0}, {&__pyx_n_s_TextIOWrapper, __pyx_k_TextIOWrapper, sizeof(__pyx_k_TextIOWrapper), 0, 0, 1, 1}, {&__pyx_kp_u_That_compression_method_is_not_s, __pyx_k_That_compression_method_is_not_s, sizeof(__pyx_k_That_compression_method_is_not_s), 0, 1, 0, 0}, {&__pyx_kp_u_The_following_enclosed_file_is_c, __pyx_k_The_following_enclosed_file_is_c, sizeof(__pyx_k_The_following_enclosed_file_is_c), 0, 1, 0, 0}, {&__pyx_kp_u_There_is_no_item_named_r_in_the, __pyx_k_There_is_no_item_named_r_in_the, sizeof(__pyx_k_There_is_no_item_named_r_in_the), 0, 1, 0, 0}, {&__pyx_kp_u_Truncated_central_directory, __pyx_k_Truncated_central_directory, sizeof(__pyx_k_Truncated_central_directory), 0, 1, 0, 0}, {&__pyx_kp_u_Truncated_file_header, __pyx_k_Truncated_file_header, sizeof(__pyx_k_Truncated_file_header), 0, 1, 0, 0}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1}, {&__pyx_n_s_UnsupportedOperation, __pyx_k_UnsupportedOperation, sizeof(__pyx_k_UnsupportedOperation), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_kp_u_Writing_not_supported, __pyx_k_Writing_not_supported, sizeof(__pyx_k_Writing_not_supported), 0, 1, 0, 0}, {&__pyx_n_s_ZIP64_LIMIT, __pyx_k_ZIP64_LIMIT, sizeof(__pyx_k_ZIP64_LIMIT), 0, 0, 1, 1}, {&__pyx_n_s_ZIP64_VERSION, __pyx_k_ZIP64_VERSION, sizeof(__pyx_k_ZIP64_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_ZIP_BZIP2, __pyx_k_ZIP_BZIP2, sizeof(__pyx_k_ZIP_BZIP2), 0, 0, 1, 1}, {&__pyx_n_u_ZIP_BZIP2, __pyx_k_ZIP_BZIP2, sizeof(__pyx_k_ZIP_BZIP2), 0, 1, 0, 1}, {&__pyx_n_s_ZIP_DEFLATED, __pyx_k_ZIP_DEFLATED, sizeof(__pyx_k_ZIP_DEFLATED), 0, 0, 1, 1}, {&__pyx_n_u_ZIP_DEFLATED, __pyx_k_ZIP_DEFLATED, sizeof(__pyx_k_ZIP_DEFLATED), 0, 1, 0, 1}, {&__pyx_n_s_ZIP_FILECOUNT_LIMIT, __pyx_k_ZIP_FILECOUNT_LIMIT, sizeof(__pyx_k_ZIP_FILECOUNT_LIMIT), 0, 0, 1, 1}, {&__pyx_n_s_ZIP_LZMA, __pyx_k_ZIP_LZMA, sizeof(__pyx_k_ZIP_LZMA), 0, 0, 1, 1}, {&__pyx_n_u_ZIP_LZMA, __pyx_k_ZIP_LZMA, sizeof(__pyx_k_ZIP_LZMA), 0, 1, 0, 1}, {&__pyx_n_s_ZIP_MAX_COMMENT, __pyx_k_ZIP_MAX_COMMENT, sizeof(__pyx_k_ZIP_MAX_COMMENT), 0, 0, 1, 1}, {&__pyx_n_s_ZIP_STORED, __pyx_k_ZIP_STORED, sizeof(__pyx_k_ZIP_STORED), 0, 0, 1, 1}, {&__pyx_n_u_ZIP_STORED, __pyx_k_ZIP_STORED, sizeof(__pyx_k_ZIP_STORED), 0, 1, 0, 1}, {&__pyx_kp_u_ZIP_does_not_support_timestamps, __pyx_k_ZIP_does_not_support_timestamps, sizeof(__pyx_k_ZIP_does_not_support_timestamps), 0, 1, 0, 0}, {&__pyx_n_s_Z_DEFAULT_COMPRESSION, __pyx_k_Z_DEFAULT_COMPRESSION, sizeof(__pyx_k_Z_DEFAULT_COMPRESSION), 0, 0, 1, 1}, {&__pyx_n_s_ZipDecrypter, __pyx_k_ZipDecrypter, sizeof(__pyx_k_ZipDecrypter), 0, 0, 1, 1}, {&__pyx_n_s_ZipDecrypter_locals_crc32, __pyx_k_ZipDecrypter_locals_crc32, sizeof(__pyx_k_ZipDecrypter_locals_crc32), 0, 0, 1, 1}, {&__pyx_n_s_ZipDecrypter_locals_decrypter, __pyx_k_ZipDecrypter_locals_decrypter, sizeof(__pyx_k_ZipDecrypter_locals_decrypter), 0, 0, 1, 1}, {&__pyx_n_s_ZipDecrypter_locals_update_keys, __pyx_k_ZipDecrypter_locals_update_keys, sizeof(__pyx_k_ZipDecrypter_locals_update_keys), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile, __pyx_k_ZipExtFile, sizeof(__pyx_k_ZipExtFile), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile___init, __pyx_k_ZipExtFile___init, sizeof(__pyx_k_ZipExtFile___init), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile___repr, __pyx_k_ZipExtFile___repr, sizeof(__pyx_k_ZipExtFile___repr), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile__init_decrypter, __pyx_k_ZipExtFile__init_decrypter, sizeof(__pyx_k_ZipExtFile__init_decrypter), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile__read1, __pyx_k_ZipExtFile__read1, sizeof(__pyx_k_ZipExtFile__read1), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile__read2, __pyx_k_ZipExtFile__read2, sizeof(__pyx_k_ZipExtFile__read2), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile__update_crc, __pyx_k_ZipExtFile__update_crc, sizeof(__pyx_k_ZipExtFile__update_crc), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile_close, __pyx_k_ZipExtFile_close, sizeof(__pyx_k_ZipExtFile_close), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile_peek, __pyx_k_ZipExtFile_peek, sizeof(__pyx_k_ZipExtFile_peek), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile_read, __pyx_k_ZipExtFile_read, sizeof(__pyx_k_ZipExtFile_read), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile_read1, __pyx_k_ZipExtFile_read1, sizeof(__pyx_k_ZipExtFile_read1), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile_readable, __pyx_k_ZipExtFile_readable, sizeof(__pyx_k_ZipExtFile_readable), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile_readline, __pyx_k_ZipExtFile_readline, sizeof(__pyx_k_ZipExtFile_readline), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile_seek, __pyx_k_ZipExtFile_seek, sizeof(__pyx_k_ZipExtFile_seek), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile_seekable, __pyx_k_ZipExtFile_seekable, sizeof(__pyx_k_ZipExtFile_seekable), 0, 0, 1, 1}, {&__pyx_n_s_ZipExtFile_tell, __pyx_k_ZipExtFile_tell, sizeof(__pyx_k_ZipExtFile_tell), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile, __pyx_k_ZipFile, sizeof(__pyx_k_ZipFile), 0, 0, 1, 1}, {&__pyx_n_u_ZipFile, __pyx_k_ZipFile, sizeof(__pyx_k_ZipFile), 0, 1, 0, 1}, {&__pyx_n_s_ZipFile__RealGetContents, __pyx_k_ZipFile__RealGetContents, sizeof(__pyx_k_ZipFile__RealGetContents), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile___del, __pyx_k_ZipFile___del, sizeof(__pyx_k_ZipFile___del), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile___enter, __pyx_k_ZipFile___enter, sizeof(__pyx_k_ZipFile___enter), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile___exit, __pyx_k_ZipFile___exit, sizeof(__pyx_k_ZipFile___exit), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile___init, __pyx_k_ZipFile___init, sizeof(__pyx_k_ZipFile___init), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile___repr, __pyx_k_ZipFile___repr, sizeof(__pyx_k_ZipFile___repr), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile__extract_member, __pyx_k_ZipFile__extract_member, sizeof(__pyx_k_ZipFile__extract_member), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile__extract_member_locals_g, __pyx_k_ZipFile__extract_member_locals_g, sizeof(__pyx_k_ZipFile__extract_member_locals_g), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile__fpclose, __pyx_k_ZipFile__fpclose, sizeof(__pyx_k_ZipFile__fpclose), 0, 0, 1, 1}, {&__pyx_kp_u_ZipFile_can_only_read, __pyx_k_ZipFile_can_only_read, sizeof(__pyx_k_ZipFile_can_only_read), 0, 1, 0, 0}, {&__pyx_n_s_ZipFile_close, __pyx_k_ZipFile_close, sizeof(__pyx_k_ZipFile_close), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile_comment, __pyx_k_ZipFile_comment, sizeof(__pyx_k_ZipFile_comment), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile_extract, __pyx_k_ZipFile_extract, sizeof(__pyx_k_ZipFile_extract), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile_extractall, __pyx_k_ZipFile_extractall, sizeof(__pyx_k_ZipFile_extractall), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile_getinfo, __pyx_k_ZipFile_getinfo, sizeof(__pyx_k_ZipFile_getinfo), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile_infolist, __pyx_k_ZipFile_infolist, sizeof(__pyx_k_ZipFile_infolist), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile_namelist, __pyx_k_ZipFile_namelist, sizeof(__pyx_k_ZipFile_namelist), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile_open, __pyx_k_ZipFile_open, sizeof(__pyx_k_ZipFile_open), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile_printdir, __pyx_k_ZipFile_printdir, sizeof(__pyx_k_ZipFile_printdir), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile_read, __pyx_k_ZipFile_read, sizeof(__pyx_k_ZipFile_read), 0, 0, 1, 1}, {&__pyx_n_s_ZipFile_setpassword, __pyx_k_ZipFile_setpassword, sizeof(__pyx_k_ZipFile_setpassword), 0, 0, 1, 1}, {&__pyx_kp_s_ZipFile_subclass_to_ensure_impl, __pyx_k_ZipFile_subclass_to_ensure_impl, sizeof(__pyx_k_ZipFile_subclass_to_ensure_impl), 0, 0, 1, 0}, {&__pyx_n_s_ZipFile_testzip, __pyx_k_ZipFile_testzip, sizeof(__pyx_k_ZipFile_testzip), 0, 0, 1, 1}, {&__pyx_n_s_ZipInfo, __pyx_k_ZipInfo, sizeof(__pyx_k_ZipInfo), 0, 0, 1, 1}, {&__pyx_n_u_ZipInfo, __pyx_k_ZipInfo, sizeof(__pyx_k_ZipInfo), 0, 1, 0, 1}, {&__pyx_n_s_ZipInfo___init, __pyx_k_ZipInfo___init, sizeof(__pyx_k_ZipInfo___init), 0, 0, 1, 1}, {&__pyx_n_s_ZipInfo___repr, __pyx_k_ZipInfo___repr, sizeof(__pyx_k_ZipInfo___repr), 0, 0, 1, 1}, {&__pyx_n_s_ZipInfo__decodeExtra, __pyx_k_ZipInfo__decodeExtra, sizeof(__pyx_k_ZipInfo__decodeExtra), 0, 0, 1, 1}, {&__pyx_n_s_ZipInfo_is_dir, __pyx_k_ZipInfo_is_dir, sizeof(__pyx_k_ZipInfo_is_dir), 0, 0, 1, 1}, {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0}, {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0}, {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0}, {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0}, {&__pyx_kp_u__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 1, 0, 0}, {&__pyx_kp_b__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 0, 0}, {&__pyx_kp_u__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 1, 0, 0}, {&__pyx_kp_b__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 0, 0}, {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0}, {&__pyx_n_u_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 1, 0, 1}, {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, {&__pyx_n_s_add_argument, __pyx_k_add_argument, sizeof(__pyx_k_add_argument), 0, 0, 1, 1}, {&__pyx_n_s_add_mutually_exclusive_group, __pyx_k_add_mutually_exclusive_group, sizeof(__pyx_k_add_mutually_exclusive_group), 0, 0, 1, 1}, {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1}, {&__pyx_n_s_allowZip64, __pyx_k_allowZip64, sizeof(__pyx_k_allowZip64), 0, 0, 1, 1}, {&__pyx_n_s_allowZip64_2, __pyx_k_allowZip64_2, sizeof(__pyx_k_allowZip64_2), 0, 0, 1, 1}, {&__pyx_n_s_altsep, __pyx_k_altsep, sizeof(__pyx_k_altsep), 0, 0, 1, 1}, {&__pyx_n_s_ancestry, __pyx_k_ancestry, sizeof(__pyx_k_ancestry), 0, 0, 1, 1}, {&__pyx_kp_u_ancestry_line_1473, __pyx_k_ancestry_line_1473, sizeof(__pyx_k_ancestry_line_1473), 0, 1, 0, 0}, {&__pyx_kp_u_and_header, __pyx_k_and_header, sizeof(__pyx_k_and_header), 0, 1, 0, 0}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_arcname, __pyx_k_arcname, sizeof(__pyx_k_arcname), 0, 0, 1, 1}, {&__pyx_n_s_argparse, __pyx_k_argparse, sizeof(__pyx_k_argparse), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_as_dirs, __pyx_k_as_dirs, sizeof(__pyx_k_as_dirs), 0, 0, 1, 1}, {&__pyx_n_s_at, __pyx_k_at, sizeof(__pyx_k_at), 0, 0, 1, 1}, {&__pyx_n_u_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 1, 0, 1}, {&__pyx_n_s_badfile, __pyx_k_badfile, sizeof(__pyx_k_badfile), 0, 0, 1, 1}, {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1}, {&__pyx_n_s_binascii, __pyx_k_binascii, sizeof(__pyx_k_binascii), 0, 0, 1, 1}, {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1}, {&__pyx_n_s_buff_offset, __pyx_k_buff_offset, sizeof(__pyx_k_buff_offset), 0, 0, 1, 1}, {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1}, {&__pyx_n_s_bz2, __pyx_k_bz2, sizeof(__pyx_k_bz2), 0, 0, 1, 1}, {&__pyx_n_u_bzip2, __pyx_k_bzip2, sizeof(__pyx_k_bzip2), 0, 1, 0, 1}, {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, {&__pyx_n_s_calcsize, __pyx_k_calcsize, sizeof(__pyx_k_calcsize), 0, 0, 1, 1}, {&__pyx_n_s_centdir, __pyx_k_centdir, sizeof(__pyx_k_centdir), 0, 0, 1, 1}, {&__pyx_n_s_ch, __pyx_k_ch, sizeof(__pyx_k_ch), 0, 0, 1, 1}, {&__pyx_n_s_chain, __pyx_k_chain, sizeof(__pyx_k_chain), 0, 0, 1, 1}, {&__pyx_n_s_check_byte, __pyx_k_check_byte, sizeof(__pyx_k_check_byte), 0, 0, 1, 1}, {&__pyx_n_s_check_compression, __pyx_k_check_compression, sizeof(__pyx_k_check_compression), 0, 0, 1, 1}, {&__pyx_n_s_check_zipfile, __pyx_k_check_zipfile, sizeof(__pyx_k_check_zipfile), 0, 0, 1, 1}, {&__pyx_n_s_chunk, __pyx_k_chunk, sizeof(__pyx_k_chunk), 0, 0, 1, 1}, {&__pyx_n_s_chunk_size, __pyx_k_chunk_size, sizeof(__pyx_k_chunk_size), 0, 0, 1, 1}, {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_close_2, __pyx_k_close_2, sizeof(__pyx_k_close_2), 0, 0, 1, 1}, {&__pyx_n_s_close_fileobj, __pyx_k_close_fileobj, sizeof(__pyx_k_close_fileobj), 0, 0, 1, 1}, {&__pyx_n_s_close_fileobj_2, __pyx_k_close_fileobj_2, sizeof(__pyx_k_close_fileobj_2), 0, 0, 1, 1}, {&__pyx_n_s_closed, __pyx_k_closed, sizeof(__pyx_k_closed), 0, 0, 1, 1}, {&__pyx_kp_u_closed_2, __pyx_k_closed_2, sizeof(__pyx_k_closed_2), 0, 1, 0, 0}, {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1}, {&__pyx_n_s_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 0, 1, 1}, {&__pyx_n_u_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 1, 0, 1}, {&__pyx_n_s_commentSize, __pyx_k_commentSize, sizeof(__pyx_k_commentSize), 0, 0, 1, 1}, {&__pyx_n_s_comment_2, __pyx_k_comment_2, sizeof(__pyx_k_comment_2), 0, 0, 1, 1}, {&__pyx_kp_u_comment_expected_bytes_got_s, __pyx_k_comment_expected_bytes_got_s, sizeof(__pyx_k_comment_expected_bytes_got_s), 0, 1, 0, 0}, {&__pyx_n_s_comp, __pyx_k_comp, sizeof(__pyx_k_comp), 0, 0, 1, 1}, {&__pyx_n_s_compress, __pyx_k_compress, sizeof(__pyx_k_compress), 0, 0, 1, 1}, {&__pyx_n_s_compress_left, __pyx_k_compress_left, sizeof(__pyx_k_compress_left), 0, 0, 1, 1}, {&__pyx_n_s_compress_size, __pyx_k_compress_size, sizeof(__pyx_k_compress_size), 0, 0, 1, 1}, {&__pyx_n_u_compress_size, __pyx_k_compress_size, sizeof(__pyx_k_compress_size), 0, 1, 0, 1}, {&__pyx_kp_u_compress_size_r, __pyx_k_compress_size_r, sizeof(__pyx_k_compress_size_r), 0, 1, 0, 0}, {&__pyx_n_s_compress_type, __pyx_k_compress_type, sizeof(__pyx_k_compress_type), 0, 0, 1, 1}, {&__pyx_n_u_compress_type, __pyx_k_compress_type, sizeof(__pyx_k_compress_type), 0, 1, 0, 1}, {&__pyx_n_s_compress_type_2, __pyx_k_compress_type_2, sizeof(__pyx_k_compress_type_2), 0, 0, 1, 1}, {&__pyx_kp_u_compress_type_s, __pyx_k_compress_type_s, sizeof(__pyx_k_compress_type_s), 0, 1, 0, 0}, {&__pyx_kp_u_compressed_patched_data_flag_bit, __pyx_k_compressed_patched_data_flag_bit, sizeof(__pyx_k_compressed_patched_data_flag_bit), 0, 1, 0, 0}, {&__pyx_n_s_compression, __pyx_k_compression, sizeof(__pyx_k_compression), 0, 0, 1, 1}, {&__pyx_kp_u_compression_type, __pyx_k_compression_type, sizeof(__pyx_k_compression_type), 0, 1, 0, 0}, {&__pyx_n_s_compresslevel, __pyx_k_compresslevel, sizeof(__pyx_k_compresslevel), 0, 0, 1, 1}, {&__pyx_n_u_compresslevel, __pyx_k_compresslevel, sizeof(__pyx_k_compresslevel), 0, 1, 0, 1}, {&__pyx_n_s_compresslevel_2, __pyx_k_compresslevel_2, sizeof(__pyx_k_compresslevel_2), 0, 0, 1, 1}, {&__pyx_n_s_compressobj, __pyx_k_compressobj, sizeof(__pyx_k_compressobj), 0, 0, 1, 1}, {&__pyx_n_s_compressor_names, __pyx_k_compressor_names, sizeof(__pyx_k_compressor_names), 0, 0, 1, 1}, {&__pyx_n_s_concat, __pyx_k_concat, sizeof(__pyx_k_concat), 0, 0, 1, 1}, {&__pyx_n_s_contains, __pyx_k_contains, sizeof(__pyx_k_contains), 0, 0, 1, 1}, {&__pyx_n_s_contextlib, __pyx_k_contextlib, sizeof(__pyx_k_contextlib), 0, 0, 1, 1}, {&__pyx_n_s_copyfileobj, __pyx_k_copyfileobj, sizeof(__pyx_k_copyfileobj), 0, 0, 1, 1}, {&__pyx_n_s_crc, __pyx_k_crc, sizeof(__pyx_k_crc), 0, 0, 1, 1}, {&__pyx_n_s_crc32, __pyx_k_crc32, sizeof(__pyx_k_crc32), 0, 0, 1, 1}, {&__pyx_n_s_crctable, __pyx_k_crctable, sizeof(__pyx_k_crctable), 0, 0, 1, 1}, {&__pyx_n_s_crctable_2, __pyx_k_crctable_2, sizeof(__pyx_k_crctable_2), 0, 0, 1, 1}, {&__pyx_n_s_create_system, __pyx_k_create_system, sizeof(__pyx_k_create_system), 0, 0, 1, 1}, {&__pyx_n_u_create_system, __pyx_k_create_system, sizeof(__pyx_k_create_system), 0, 1, 0, 1}, {&__pyx_n_s_create_version, __pyx_k_create_version, sizeof(__pyx_k_create_version), 0, 0, 1, 1}, {&__pyx_n_u_create_version, __pyx_k_create_version, sizeof(__pyx_k_create_version), 0, 1, 0, 1}, {&__pyx_n_s_curdir, __pyx_k_curdir, sizeof(__pyx_k_curdir), 0, 0, 1, 1}, {&__pyx_n_s_curr_pos, __pyx_k_curr_pos, sizeof(__pyx_k_curr_pos), 0, 0, 1, 1}, {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1}, {&__pyx_kp_u_d_02d_02d_02d_02d_02d, __pyx_k_d_02d_02d_02d_02d_02d, sizeof(__pyx_k_d_02d_02d_02d_02d_02d), 0, 1, 0, 0}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1}, {&__pyx_n_s_date_time, __pyx_k_date_time, sizeof(__pyx_k_date_time), 0, 0, 1, 1}, {&__pyx_n_u_date_time, __pyx_k_date_time, sizeof(__pyx_k_date_time), 0, 1, 0, 1}, {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1}, {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, {&__pyx_n_s_decodeExtra, __pyx_k_decodeExtra, sizeof(__pyx_k_decodeExtra), 0, 0, 1, 1}, {&__pyx_n_s_decode_filter_properties, __pyx_k_decode_filter_properties, sizeof(__pyx_k_decode_filter_properties), 0, 0, 1, 1}, {&__pyx_n_s_decomp, __pyx_k_decomp, sizeof(__pyx_k_decomp), 0, 0, 1, 1}, {&__pyx_n_s_decompress, __pyx_k_decompress, sizeof(__pyx_k_decompress), 0, 0, 1, 1}, {&__pyx_n_s_decompressobj, __pyx_k_decompressobj, sizeof(__pyx_k_decompressobj), 0, 0, 1, 1}, {&__pyx_n_s_decompressor, __pyx_k_decompressor, sizeof(__pyx_k_decompressor), 0, 0, 1, 1}, {&__pyx_n_s_decrypter, __pyx_k_decrypter, sizeof(__pyx_k_decrypter), 0, 0, 1, 1}, {&__pyx_n_s_decrypter_2, __pyx_k_decrypter_2, sizeof(__pyx_k_decrypter_2), 0, 0, 1, 1}, {&__pyx_n_s_dedupe, __pyx_k_dedupe, sizeof(__pyx_k_dedupe), 0, 0, 1, 1}, {&__pyx_n_u_deflate, __pyx_k_deflate, sizeof(__pyx_k_deflate), 0, 1, 0, 1}, {&__pyx_n_u_deflate64, __pyx_k_deflate64, sizeof(__pyx_k_deflate64), 0, 1, 0, 1}, {&__pyx_n_s_del, __pyx_k_del, sizeof(__pyx_k_del), 0, 0, 1, 1}, {&__pyx_n_s_descr, __pyx_k_descr, sizeof(__pyx_k_descr), 0, 0, 1, 1}, {&__pyx_n_s_description, __pyx_k_description, sizeof(__pyx_k_description), 0, 0, 1, 1}, {&__pyx_n_s_didModify, __pyx_k_didModify, sizeof(__pyx_k_didModify), 0, 0, 1, 1}, {&__pyx_kp_u_differ, __pyx_k_differ, sizeof(__pyx_k_differ), 0, 1, 0, 0}, {&__pyx_n_s_difference, __pyx_k_difference, sizeof(__pyx_k_difference), 0, 0, 1, 1}, {&__pyx_n_s_dir_match, __pyx_k_dir_match, sizeof(__pyx_k_dir_match), 0, 0, 1, 1}, {&__pyx_n_s_dircount, __pyx_k_dircount, sizeof(__pyx_k_dircount), 0, 0, 1, 1}, {&__pyx_n_s_dircount2, __pyx_k_dircount2, sizeof(__pyx_k_dircount2), 0, 0, 1, 1}, {&__pyx_n_s_dirname, __pyx_k_dirname, sizeof(__pyx_k_dirname), 0, 0, 1, 1}, {&__pyx_n_s_diroffset, __pyx_k_diroffset, sizeof(__pyx_k_diroffset), 0, 0, 1, 1}, {&__pyx_n_s_dirsize, __pyx_k_dirsize, sizeof(__pyx_k_dirsize), 0, 0, 1, 1}, {&__pyx_n_s_disk_dir, __pyx_k_disk_dir, sizeof(__pyx_k_disk_dir), 0, 0, 1, 1}, {&__pyx_n_s_disk_num, __pyx_k_disk_num, sizeof(__pyx_k_disk_num), 0, 0, 1, 1}, {&__pyx_n_s_diskno, __pyx_k_diskno, sizeof(__pyx_k_diskno), 0, 0, 1, 1}, {&__pyx_n_s_disks, __pyx_k_disks, sizeof(__pyx_k_disks), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_kp_u_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 1, 0, 0}, {&__pyx_n_s_encode_filter_properties, __pyx_k_encode_filter_properties, sizeof(__pyx_k_encode_filter_properties), 0, 0, 1, 1}, {&__pyx_kp_u_encoding_args_invalid_for_binary, __pyx_k_encoding_args_invalid_for_binary, sizeof(__pyx_k_encoding_args_invalid_for_binary), 0, 1, 0, 0}, {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_endrec, __pyx_k_endrec, sizeof(__pyx_k_endrec), 0, 0, 1, 1}, {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1}, {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, {&__pyx_n_s_eof, __pyx_k_eof, sizeof(__pyx_k_eof), 0, 0, 1, 1}, {&__pyx_n_s_eof_2, __pyx_k_eof_2, sizeof(__pyx_k_eof_2), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, {&__pyx_n_u_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 1, 0, 1}, {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1}, {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, {&__pyx_n_s_expected_crc, __pyx_k_expected_crc, sizeof(__pyx_k_expected_crc), 0, 0, 1, 1}, {&__pyx_n_s_external_attr, __pyx_k_external_attr, sizeof(__pyx_k_external_attr), 0, 0, 1, 1}, {&__pyx_n_u_external_attr, __pyx_k_external_attr, sizeof(__pyx_k_external_attr), 0, 1, 0, 1}, {&__pyx_kp_u_external_attr_x, __pyx_k_external_attr_x, sizeof(__pyx_k_external_attr_x), 0, 1, 0, 0}, {&__pyx_n_s_extra, __pyx_k_extra, sizeof(__pyx_k_extra), 0, 0, 1, 1}, {&__pyx_n_u_extra, __pyx_k_extra, sizeof(__pyx_k_extra), 0, 1, 0, 1}, {&__pyx_kp_u_extract, __pyx_k_extract, sizeof(__pyx_k_extract), 0, 1, 0, 0}, {&__pyx_n_s_extract_2, __pyx_k_extract_2, sizeof(__pyx_k_extract_2), 0, 0, 1, 1}, {&__pyx_n_s_extract_member, __pyx_k_extract_member, sizeof(__pyx_k_extract_member), 0, 0, 1, 1}, {&__pyx_n_s_extract_version, __pyx_k_extract_version, sizeof(__pyx_k_extract_version), 0, 0, 1, 1}, {&__pyx_n_u_extract_version, __pyx_k_extract_version, sizeof(__pyx_k_extract_version), 0, 1, 0, 1}, {&__pyx_n_s_extractall, __pyx_k_extractall, sizeof(__pyx_k_extractall), 0, 0, 1, 1}, {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, {&__pyx_n_s_fheader, __pyx_k_fheader, sizeof(__pyx_k_fheader), 0, 0, 1, 1}, {&__pyx_n_s_field, __pyx_k_field, sizeof(__pyx_k_field), 0, 0, 1, 1}, {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_filePassed, __pyx_k_filePassed, sizeof(__pyx_k_filePassed), 0, 0, 1, 1}, {&__pyx_n_s_fileRefCnt, __pyx_k_fileRefCnt, sizeof(__pyx_k_fileRefCnt), 0, 0, 1, 1}, {&__pyx_n_s_file_2, __pyx_k_file_2, sizeof(__pyx_k_file_2), 0, 0, 1, 1}, {&__pyx_kp_u_file_r, __pyx_k_file_r, sizeof(__pyx_k_file_r), 0, 1, 0, 0}, {&__pyx_n_s_file_size, __pyx_k_file_size, sizeof(__pyx_k_file_size), 0, 0, 1, 1}, {&__pyx_n_u_file_size, __pyx_k_file_size, sizeof(__pyx_k_file_size), 0, 1, 0, 1}, {&__pyx_kp_u_file_size_r, __pyx_k_file_size_r, sizeof(__pyx_k_file_size_r), 0, 1, 0, 0}, {&__pyx_n_s_filelist, __pyx_k_filelist, sizeof(__pyx_k_filelist), 0, 0, 1, 1}, {&__pyx_n_s_filemode, __pyx_k_filemode, sizeof(__pyx_k_filemode), 0, 0, 1, 1}, {&__pyx_kp_u_filemode_r, __pyx_k_filemode_r, sizeof(__pyx_k_filemode_r), 0, 1, 0, 0}, {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1}, {&__pyx_n_u_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 1, 0, 1}, {&__pyx_kp_u_filename_2, __pyx_k_filename_2, sizeof(__pyx_k_filename_2), 0, 1, 0, 0}, {&__pyx_kp_u_filename_r, __pyx_k_filename_r, sizeof(__pyx_k_filename_r), 0, 1, 0, 0}, {&__pyx_n_s_fileobj, __pyx_k_fileobj, sizeof(__pyx_k_fileobj), 0, 0, 1, 1}, {&__pyx_n_s_fileobj_2, __pyx_k_fileobj_2, sizeof(__pyx_k_fileobj_2), 0, 0, 1, 1}, {&__pyx_n_s_filepos, __pyx_k_filepos, sizeof(__pyx_k_filepos), 0, 0, 1, 1}, {&__pyx_n_s_filesize, __pyx_k_filesize, sizeof(__pyx_k_filesize), 0, 0, 1, 1}, {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1}, {&__pyx_n_s_filterfalse, __pyx_k_filterfalse, sizeof(__pyx_k_filterfalse), 0, 0, 1, 1}, {&__pyx_n_s_filters, __pyx_k_filters, sizeof(__pyx_k_filters), 0, 0, 1, 1}, {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1}, {&__pyx_n_s_flag_bits, __pyx_k_flag_bits, sizeof(__pyx_k_flag_bits), 0, 0, 1, 1}, {&__pyx_n_u_flag_bits, __pyx_k_flag_bits, sizeof(__pyx_k_flag_bits), 0, 1, 0, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 0, 0, 1, 1}, {&__pyx_n_s_fname, __pyx_k_fname, sizeof(__pyx_k_fname), 0, 0, 1, 1}, {&__pyx_n_s_fname_str, __pyx_k_fname_str, sizeof(__pyx_k_fname_str), 0, 0, 1, 1}, {&__pyx_n_s_force_zip64, __pyx_k_force_zip64, sizeof(__pyx_k_force_zip64), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_fp, __pyx_k_fp, sizeof(__pyx_k_fp), 0, 0, 1, 1}, {&__pyx_n_s_fpclose, __pyx_k_fpclose, sizeof(__pyx_k_fpclose), 0, 0, 1, 1}, {&__pyx_n_s_fpin, __pyx_k_fpin, sizeof(__pyx_k_fpin), 0, 0, 1, 1}, {&__pyx_n_s_from_iterable, __pyx_k_from_iterable, sizeof(__pyx_k_from_iterable), 0, 0, 1, 1}, {&__pyx_n_s_fromkeys, __pyx_k_fromkeys, sizeof(__pyx_k_fromkeys), 0, 0, 1, 1}, {&__pyx_n_s_fspath, __pyx_k_fspath, sizeof(__pyx_k_fspath), 0, 0, 1, 1}, {&__pyx_n_s_gen_crc, __pyx_k_gen_crc, sizeof(__pyx_k_gen_crc), 0, 0, 1, 1}, {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_compressor, __pyx_k_get_compressor, sizeof(__pyx_k_get_compressor), 0, 0, 1, 1}, {&__pyx_n_s_get_decompressor, __pyx_k_get_decompressor, sizeof(__pyx_k_get_decompressor), 0, 0, 1, 1}, {&__pyx_n_s_getcwd, __pyx_k_getcwd, sizeof(__pyx_k_getcwd), 0, 0, 1, 1}, {&__pyx_n_s_getinfo, __pyx_k_getinfo, sizeof(__pyx_k_getinfo), 0, 0, 1, 1}, {&__pyx_kp_u_given_inferred_offset, __pyx_k_given_inferred_offset, sizeof(__pyx_k_given_inferred_offset), 0, 1, 0, 0}, {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1}, {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1}, {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1}, {&__pyx_n_s_header_offset, __pyx_k_header_offset, sizeof(__pyx_k_header_offset), 0, 0, 1, 1}, {&__pyx_n_u_header_offset, __pyx_k_header_offset, sizeof(__pyx_k_header_offset), 0, 1, 0, 1}, {&__pyx_n_s_help, __pyx_k_help, sizeof(__pyx_k_help), 0, 0, 1, 1}, {&__pyx_n_s_hi, __pyx_k_hi, sizeof(__pyx_k_hi), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_u_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 1, 0, 1}, {&__pyx_n_s_implied_dirs, __pyx_k_implied_dirs, sizeof(__pyx_k_implied_dirs), 0, 0, 1, 1}, {&__pyx_n_u_implode, __pyx_k_implode, sizeof(__pyx_k_implode), 0, 1, 0, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_importlib, __pyx_k_importlib, sizeof(__pyx_k_importlib), 0, 0, 1, 1}, {&__pyx_n_s_importlib_util, __pyx_k_importlib_util, sizeof(__pyx_k_importlib_util), 0, 0, 1, 1}, {&__pyx_n_s_inferred, __pyx_k_inferred, sizeof(__pyx_k_inferred), 0, 0, 1, 1}, {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, {&__pyx_n_s_infolist, __pyx_k_infolist, sizeof(__pyx_k_infolist), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_init_2, __pyx_k_init_2, sizeof(__pyx_k_init_2), 0, 0, 1, 1}, {&__pyx_n_s_init_decrypter, __pyx_k_init_decrypter, sizeof(__pyx_k_init_decrypter), 0, 0, 1, 1}, {&__pyx_n_s_internal_attr, __pyx_k_internal_attr, sizeof(__pyx_k_internal_attr), 0, 0, 1, 1}, {&__pyx_n_u_internal_attr, __pyx_k_internal_attr, sizeof(__pyx_k_internal_attr), 0, 1, 0, 1}, {&__pyx_n_s_invalid_path_parts, __pyx_k_invalid_path_parts, sizeof(__pyx_k_invalid_path_parts), 0, 0, 1, 1}, {&__pyx_n_s_io, __pyx_k_io, sizeof(__pyx_k_io), 0, 0, 1, 1}, {&__pyx_n_s_is_child, __pyx_k_is_child, sizeof(__pyx_k_is_child), 0, 0, 1, 1}, {&__pyx_n_s_is_dir, __pyx_k_is_dir, sizeof(__pyx_k_is_dir), 0, 0, 1, 1}, {&__pyx_n_s_is_encrypted, __pyx_k_is_encrypted, sizeof(__pyx_k_is_encrypted), 0, 0, 1, 1}, {&__pyx_n_s_is_file, __pyx_k_is_file, sizeof(__pyx_k_is_file), 0, 0, 1, 1}, {&__pyx_n_s_is_zipfile, __pyx_k_is_zipfile, sizeof(__pyx_k_is_zipfile), 0, 0, 1, 1}, {&__pyx_n_u_is_zipfile, __pyx_k_is_zipfile, sizeof(__pyx_k_is_zipfile), 0, 1, 0, 1}, {&__pyx_n_s_isdir, __pyx_k_isdir, sizeof(__pyx_k_isdir), 0, 0, 1, 1}, {&__pyx_n_s_islice, __pyx_k_islice, sizeof(__pyx_k_islice), 0, 0, 1, 1}, {&__pyx_n_s_iterdir, __pyx_k_iterdir, sizeof(__pyx_k_iterdir), 0, 0, 1, 1}, {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, {&__pyx_n_s_joinpath, __pyx_k_joinpath, sizeof(__pyx_k_joinpath), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_key0, __pyx_k_key0, sizeof(__pyx_k_key0), 0, 0, 1, 1}, {&__pyx_n_s_key1, __pyx_k_key1, sizeof(__pyx_k_key1), 0, 0, 1, 1}, {&__pyx_n_s_key2, __pyx_k_key2, sizeof(__pyx_k_key2), 0, 0, 1, 1}, {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, {&__pyx_kp_u_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 1, 0, 0}, {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1}, {&__pyx_n_s_limit, __pyx_k_limit, sizeof(__pyx_k_limit), 0, 0, 1, 1}, {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1}, {&__pyx_kp_u_list, __pyx_k_list, sizeof(__pyx_k_list), 0, 1, 0, 0}, {&__pyx_n_s_list_2, __pyx_k_list_2, sizeof(__pyx_k_list_2), 0, 0, 1, 1}, {&__pyx_n_s_ln, __pyx_k_ln, sizeof(__pyx_k_ln), 0, 0, 1, 1}, {&__pyx_n_s_lo, __pyx_k_lo, sizeof(__pyx_k_lo), 0, 0, 1, 1}, {&__pyx_n_s_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 0, 1, 1}, {&__pyx_n_s_lock_2, __pyx_k_lock_2, sizeof(__pyx_k_lock_2), 0, 0, 1, 1}, {&__pyx_n_u_lz77, __pyx_k_lz77, sizeof(__pyx_k_lz77), 0, 1, 0, 1}, {&__pyx_n_s_lzma, __pyx_k_lzma, sizeof(__pyx_k_lzma), 0, 0, 1, 1}, {&__pyx_n_u_lzma, __pyx_k_lzma, sizeof(__pyx_k_lzma), 0, 1, 0, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_u_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 1, 0, 1}, {&__pyx_n_s_main_2, __pyx_k_main_2, sizeof(__pyx_k_main_2), 0, 0, 1, 1}, {&__pyx_n_s_make, __pyx_k_make, sizeof(__pyx_k_make), 0, 0, 1, 1}, {&__pyx_n_s_makedirs, __pyx_k_makedirs, sizeof(__pyx_k_makedirs), 0, 0, 1, 1}, {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1}, {&__pyx_n_s_maxCommentStart, __pyx_k_maxCommentStart, sizeof(__pyx_k_maxCommentStart), 0, 0, 1, 1}, {&__pyx_n_s_member, __pyx_k_member, sizeof(__pyx_k_member), 0, 0, 1, 1}, {&__pyx_n_s_members, __pyx_k_members, sizeof(__pyx_k_members), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_metavar, __pyx_k_metavar, sizeof(__pyx_k_metavar), 0, 0, 1, 1}, {&__pyx_n_s_minuend, __pyx_k_minuend, sizeof(__pyx_k_minuend), 0, 0, 1, 1}, {&__pyx_n_s_mkdir, __pyx_k_mkdir, sizeof(__pyx_k_mkdir), 0, 0, 1, 1}, {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1}, {&__pyx_n_s_modeDict, __pyx_k_modeDict, sizeof(__pyx_k_modeDict), 0, 0, 1, 1}, {&__pyx_n_s_modified, __pyx_k_modified, sizeof(__pyx_k_modified), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_u_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 0, 1}, {&__pyx_kp_u_name_r, __pyx_k_name_r, sizeof(__pyx_k_name_r), 0, 1, 0, 0}, {&__pyx_n_s_name_set, __pyx_k_name_set, sizeof(__pyx_k_name_set), 0, 0, 1, 1}, {&__pyx_n_s_namelist, __pyx_k_namelist, sizeof(__pyx_k_namelist), 0, 0, 1, 1}, {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1}, {&__pyx_n_s_nargs, __pyx_k_nargs, sizeof(__pyx_k_nargs), 0, 0, 1, 1}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, {&__pyx_n_s_new_pos, __pyx_k_new_pos, sizeof(__pyx_k_new_pos), 0, 0, 1, 1}, {&__pyx_n_s_newdata, __pyx_k_newdata, sizeof(__pyx_k_newdata), 0, 0, 1, 1}, {&__pyx_n_s_newlines, __pyx_k_newlines, sizeof(__pyx_k_newlines), 0, 0, 1, 1}, {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1}, {&__pyx_n_s_next_2, __pyx_k_next_2, sizeof(__pyx_k_next_2), 0, 0, 1, 1}, {&__pyx_n_s_normpath, __pyx_k_normpath, sizeof(__pyx_k_normpath), 0, 0, 1, 1}, {&__pyx_kp_u_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 1, 0, 0}, {&__pyx_n_s_null_byte, __pyx_k_null_byte, sizeof(__pyx_k_null_byte), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1}, {&__pyx_n_s_offset_2, __pyx_k_offset_2, sizeof(__pyx_k_offset_2), 0, 0, 1, 1}, {&__pyx_n_s_offset_cd, __pyx_k_offset_cd, sizeof(__pyx_k_offset_cd), 0, 0, 1, 1}, {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, {&__pyx_n_s_orig_compress_size, __pyx_k_orig_compress_size, sizeof(__pyx_k_orig_compress_size), 0, 0, 1, 1}, {&__pyx_n_s_orig_compress_start, __pyx_k_orig_compress_start, sizeof(__pyx_k_orig_compress_start), 0, 0, 1, 1}, {&__pyx_n_s_orig_file_size, __pyx_k_orig_file_size, sizeof(__pyx_k_orig_file_size), 0, 0, 1, 1}, {&__pyx_n_s_orig_filename, __pyx_k_orig_filename, sizeof(__pyx_k_orig_filename), 0, 0, 1, 1}, {&__pyx_n_u_orig_filename, __pyx_k_orig_filename, sizeof(__pyx_k_orig_filename), 0, 1, 0, 1}, {&__pyx_n_s_orig_start_crc, __pyx_k_orig_start_crc, sizeof(__pyx_k_orig_start_crc), 0, 0, 1, 1}, {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, {&__pyx_kp_u_output_dir, __pyx_k_output_dir, sizeof(__pyx_k_output_dir), 0, 1, 0, 0}, {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1}, {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, {&__pyx_n_s_pardir, __pyx_k_pardir, sizeof(__pyx_k_pardir), 0, 0, 1, 1}, {&__pyx_n_s_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1}, {&__pyx_n_s_parent_at, __pyx_k_parent_at, sizeof(__pyx_k_parent_at), 0, 0, 1, 1}, {&__pyx_n_s_parents, __pyx_k_parents, sizeof(__pyx_k_parents), 0, 0, 1, 1}, {&__pyx_n_s_parents_2, __pyx_k_parents_2, sizeof(__pyx_k_parents_2), 0, 0, 1, 1}, {&__pyx_kp_u_parents_line_1455, __pyx_k_parents_line_1455, sizeof(__pyx_k_parents_line_1455), 0, 1, 0, 0}, {&__pyx_n_s_parse_args, __pyx_k_parse_args, sizeof(__pyx_k_parse_args), 0, 0, 1, 1}, {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1}, {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1}, {&__pyx_n_s_peek, __pyx_k_peek, sizeof(__pyx_k_peek), 0, 0, 1, 1}, {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1}, {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1}, {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1}, {&__pyx_n_s_pos_2, __pyx_k_pos_2, sizeof(__pyx_k_pos_2), 0, 0, 1, 1}, {&__pyx_n_s_posixpath, __pyx_k_posixpath, sizeof(__pyx_k_posixpath), 0, 0, 1, 1}, {&__pyx_n_u_ppmd, __pyx_k_ppmd, sizeof(__pyx_k_ppmd), 0, 1, 0, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_printdir, __pyx_k_printdir, sizeof(__pyx_k_printdir), 0, 0, 1, 1}, {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1}, {&__pyx_n_s_props, __pyx_k_props, sizeof(__pyx_k_props), 0, 0, 1, 1}, {&__pyx_n_s_psize, __pyx_k_psize, sizeof(__pyx_k_psize), 0, 0, 1, 1}, {&__pyx_n_s_pwd, __pyx_k_pwd, sizeof(__pyx_k_pwd), 0, 0, 1, 1}, {&__pyx_n_u_pwd, __pyx_k_pwd, sizeof(__pyx_k_pwd), 0, 1, 0, 1}, {&__pyx_n_s_pwd_2, __pyx_k_pwd_2, sizeof(__pyx_k_pwd_2), 0, 0, 1, 1}, {&__pyx_kp_u_pwd_expected_bytes_got_s, __pyx_k_pwd_expected_bytes_got_s, sizeof(__pyx_k_pwd_expected_bytes_got_s), 0, 1, 0, 0}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 1}, {&__pyx_kp_u_r_b, __pyx_k_r_b, sizeof(__pyx_k_r_b), 0, 1, 0, 0}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_raw_time, __pyx_k_raw_time, sizeof(__pyx_k_raw_time), 0, 0, 1, 1}, {&__pyx_n_u_raw_time, __pyx_k_raw_time, sizeof(__pyx_k_raw_time), 0, 1, 0, 1}, {&__pyx_n_u_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 1, 0, 1}, {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1}, {&__pyx_n_u_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 1, 0, 1}, {&__pyx_n_s_read1, __pyx_k_read1, sizeof(__pyx_k_read1), 0, 0, 1, 1}, {&__pyx_n_s_read1_2, __pyx_k_read1_2, sizeof(__pyx_k_read1_2), 0, 0, 1, 1}, {&__pyx_n_s_read2, __pyx_k_read2, sizeof(__pyx_k_read2), 0, 0, 1, 1}, {&__pyx_n_s_read_bytes, __pyx_k_read_bytes, sizeof(__pyx_k_read_bytes), 0, 0, 1, 1}, {&__pyx_kp_u_read_from_closed_file, __pyx_k_read_from_closed_file, sizeof(__pyx_k_read_from_closed_file), 0, 1, 0, 0}, {&__pyx_n_s_read_len, __pyx_k_read_len, sizeof(__pyx_k_read_len), 0, 0, 1, 1}, {&__pyx_n_s_read_offset, __pyx_k_read_offset, sizeof(__pyx_k_read_offset), 0, 0, 1, 1}, {&__pyx_n_s_read_text, __pyx_k_read_text, sizeof(__pyx_k_read_text), 0, 0, 1, 1}, {&__pyx_n_s_read_version, __pyx_k_read_version, sizeof(__pyx_k_read_version), 0, 0, 1, 1}, {&__pyx_n_s_readable, __pyx_k_readable, sizeof(__pyx_k_readable), 0, 0, 1, 1}, {&__pyx_n_s_readbuffer, __pyx_k_readbuffer, sizeof(__pyx_k_readbuffer), 0, 0, 1, 1}, {&__pyx_n_s_readline, __pyx_k_readline, sizeof(__pyx_k_readline), 0, 0, 1, 1}, {&__pyx_n_s_recData, __pyx_k_recData, sizeof(__pyx_k_recData), 0, 0, 1, 1}, {&__pyx_n_u_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 1, 0, 1}, {&__pyx_n_s_reloff, __pyx_k_reloff, sizeof(__pyx_k_reloff), 0, 0, 1, 1}, {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1}, {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1}, {&__pyx_n_s_required, __pyx_k_required, sizeof(__pyx_k_required), 0, 0, 1, 1}, {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1}, {&__pyx_n_s_reserved, __pyx_k_reserved, sizeof(__pyx_k_reserved), 0, 0, 1, 1}, {&__pyx_n_u_reserved, __pyx_k_reserved, sizeof(__pyx_k_reserved), 0, 1, 0, 1}, {&__pyx_n_s_resolve_dir, __pyx_k_resolve_dir, sizeof(__pyx_k_resolve_dir), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_n_s_rfind, __pyx_k_rfind, sizeof(__pyx_k_rfind), 0, 0, 1, 1}, {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1}, {&__pyx_n_s_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 0, 1, 1}, {&__pyx_n_s_running_crc, __pyx_k_running_crc, sizeof(__pyx_k_running_crc), 0, 0, 1, 1}, {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1}, {&__pyx_kp_u_seek_on_closed_file, __pyx_k_seek_on_closed_file, sizeof(__pyx_k_seek_on_closed_file), 0, 1, 0, 0}, {&__pyx_n_s_seekable, __pyx_k_seekable, sizeof(__pyx_k_seekable), 0, 0, 1, 1}, {&__pyx_n_s_seekable_2, __pyx_k_seekable_2, sizeof(__pyx_k_seekable_2), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_kp_u_self___class_____name___self_ro, __pyx_k_self___class_____name___self_ro, sizeof(__pyx_k_self___class_____name___self_ro), 0, 1, 0, 0}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, {&__pyx_n_s_sep, __pyx_k_sep, sizeof(__pyx_k_sep), 0, 0, 1, 1}, {&__pyx_n_s_setpassword, __pyx_k_setpassword, sizeof(__pyx_k_setpassword), 0, 0, 1, 1}, {&__pyx_n_s_setter, __pyx_k_setter, sizeof(__pyx_k_setter), 0, 0, 1, 1}, {&__pyx_n_u_shrink, __pyx_k_shrink, sizeof(__pyx_k_shrink), 0, 1, 0, 1}, {&__pyx_n_s_shutil, __pyx_k_shutil, sizeof(__pyx_k_shutil), 0, 0, 1, 1}, {&__pyx_n_s_sig, __pyx_k_sig, sizeof(__pyx_k_sig), 0, 0, 1, 1}, {&__pyx_kp_u_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 1, 0, 0}, {&__pyx_n_s_sizeCentralDir, __pyx_k_sizeCentralDir, sizeof(__pyx_k_sizeCentralDir), 0, 0, 1, 1}, {&__pyx_n_s_sizeEndCentDir, __pyx_k_sizeEndCentDir, sizeof(__pyx_k_sizeEndCentDir), 0, 0, 1, 1}, {&__pyx_n_s_sizeEndCentDir64, __pyx_k_sizeEndCentDir64, sizeof(__pyx_k_sizeEndCentDir64), 0, 0, 1, 1}, {&__pyx_n_s_sizeEndCentDir64Locator, __pyx_k_sizeEndCentDir64Locator, sizeof(__pyx_k_sizeEndCentDir64Locator), 0, 0, 1, 1}, {&__pyx_n_s_sizeFileHeader, __pyx_k_sizeFileHeader, sizeof(__pyx_k_sizeFileHeader), 0, 0, 1, 1}, {&__pyx_n_s_size_cd, __pyx_k_size_cd, sizeof(__pyx_k_size_cd), 0, 0, 1, 1}, {&__pyx_n_s_slots, __pyx_k_slots, sizeof(__pyx_k_slots), 0, 0, 1, 1}, {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, {&__pyx_n_s_splitdrive, __pyx_k_splitdrive, sizeof(__pyx_k_splitdrive), 0, 0, 1, 1}, {&__pyx_n_s_src, __pyx_k_src, sizeof(__pyx_k_src), 0, 0, 1, 1}, {&__pyx_n_s_stacklevel, __pyx_k_stacklevel, sizeof(__pyx_k_stacklevel), 0, 0, 1, 1}, {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, {&__pyx_n_s_start_dir, __pyx_k_start_dir, sizeof(__pyx_k_start_dir), 0, 0, 1, 1}, {&__pyx_n_s_stat, __pyx_k_stat, sizeof(__pyx_k_stat), 0, 0, 1, 1}, {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1}, {&__pyx_n_u_store, __pyx_k_store, sizeof(__pyx_k_store), 0, 1, 0, 1}, {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1}, {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1}, {&__pyx_n_s_strict_timestamps, __pyx_k_strict_timestamps, sizeof(__pyx_k_strict_timestamps), 0, 0, 1, 1}, {&__pyx_n_s_strict_timestamps_2, __pyx_k_strict_timestamps_2, sizeof(__pyx_k_strict_timestamps_2), 0, 0, 1, 1}, {&__pyx_n_s_stringCentralDir, __pyx_k_stringCentralDir, sizeof(__pyx_k_stringCentralDir), 0, 0, 1, 1}, {&__pyx_n_s_stringEndArchive, __pyx_k_stringEndArchive, sizeof(__pyx_k_stringEndArchive), 0, 0, 1, 1}, {&__pyx_n_s_stringEndArchive64, __pyx_k_stringEndArchive64, sizeof(__pyx_k_stringEndArchive64), 0, 0, 1, 1}, {&__pyx_n_s_stringEndArchive64Locator, __pyx_k_stringEndArchive64Locator, sizeof(__pyx_k_stringEndArchive64Locator), 0, 0, 1, 1}, {&__pyx_n_s_stringFileHeader, __pyx_k_stringFileHeader, sizeof(__pyx_k_stringFileHeader), 0, 0, 1, 1}, {&__pyx_n_s_strip_extra, __pyx_k_strip_extra, sizeof(__pyx_k_strip_extra), 0, 0, 1, 1}, {&__pyx_n_s_strm, __pyx_k_strm, sizeof(__pyx_k_strm), 0, 0, 1, 1}, {&__pyx_kp_u_strong_encryption_flag_bit_6, __pyx_k_strong_encryption_flag_bit_6, sizeof(__pyx_k_strong_encryption_flag_bit_6), 0, 1, 0, 0}, {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1}, {&__pyx_n_s_structCentralDir, __pyx_k_structCentralDir, sizeof(__pyx_k_structCentralDir), 0, 0, 1, 1}, {&__pyx_n_s_structEndArchive, __pyx_k_structEndArchive, sizeof(__pyx_k_structEndArchive), 0, 0, 1, 1}, {&__pyx_n_s_structEndArchive64, __pyx_k_structEndArchive64, sizeof(__pyx_k_structEndArchive64), 0, 0, 1, 1}, {&__pyx_n_s_structEndArchive64Locator, __pyx_k_structEndArchive64Locator, sizeof(__pyx_k_structEndArchive64Locator), 0, 0, 1, 1}, {&__pyx_n_s_structFileHeader, __pyx_k_structFileHeader, sizeof(__pyx_k_structFileHeader), 0, 0, 1, 1}, {&__pyx_n_s_subs, __pyx_k_subs, sizeof(__pyx_k_subs), 0, 0, 1, 1}, {&__pyx_n_s_subtrahend, __pyx_k_subtrahend, sizeof(__pyx_k_subtrahend), 0, 0, 1, 1}, {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, {&__pyx_n_s_suppress, __pyx_k_suppress, sizeof(__pyx_k_suppress), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_sz, __pyx_k_sz, sizeof(__pyx_k_sz), 0, 0, 1, 1}, {&__pyx_kp_u_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 1, 0, 0}, {&__pyx_n_s_t_2, __pyx_k_t_2, sizeof(__pyx_k_t_2), 0, 0, 1, 1}, {&__pyx_n_s_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 0, 0, 1, 1}, {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1}, {&__pyx_n_s_targetpath, __pyx_k_targetpath, sizeof(__pyx_k_targetpath), 0, 0, 1, 1}, {&__pyx_n_s_tell, __pyx_k_tell, sizeof(__pyx_k_tell), 0, 0, 1, 1}, {&__pyx_kp_u_tell_on_closed_file, __pyx_k_tell_on_closed_file, sizeof(__pyx_k_tell_on_closed_file), 0, 1, 0, 0}, {&__pyx_n_u_terse, __pyx_k_terse, sizeof(__pyx_k_terse), 0, 1, 0, 1}, {&__pyx_kp_u_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 1, 0, 0}, {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1}, {&__pyx_n_s_test_3, __pyx_k_test_3, sizeof(__pyx_k_test_3), 0, 0, 1, 1}, {&__pyx_n_s_testzip, __pyx_k_testzip, sizeof(__pyx_k_testzip), 0, 0, 1, 1}, {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1}, {&__pyx_n_u_tokenize, __pyx_k_tokenize, sizeof(__pyx_k_tokenize), 0, 1, 0, 1}, {&__pyx_n_s_total, __pyx_k_total, sizeof(__pyx_k_total), 0, 0, 1, 1}, {&__pyx_n_u_total, __pyx_k_total, sizeof(__pyx_k_total), 0, 1, 0, 1}, {&__pyx_n_s_tp, __pyx_k_tp, sizeof(__pyx_k_tp), 0, 0, 1, 1}, {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, {&__pyx_n_s_truediv, __pyx_k_truediv, sizeof(__pyx_k_truediv), 0, 0, 1, 1}, {&__pyx_n_s_turbozipfile, __pyx_k_turbozipfile, sizeof(__pyx_k_turbozipfile), 0, 0, 1, 1}, {&__pyx_kp_s_turbozipfile_py, __pyx_k_turbozipfile_py, sizeof(__pyx_k_turbozipfile_py), 0, 0, 1, 0}, {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, {&__pyx_n_s_unconsumed, __pyx_k_unconsumed, sizeof(__pyx_k_unconsumed), 0, 0, 1, 1}, {&__pyx_n_s_unconsumed_tail, __pyx_k_unconsumed_tail, sizeof(__pyx_k_unconsumed_tail), 0, 0, 1, 1}, {&__pyx_kp_u_underlying_stream_is_not_seekabl, __pyx_k_underlying_stream_is_not_seekabl, sizeof(__pyx_k_underlying_stream_is_not_seekabl), 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_update_crc, __pyx_k_update_crc, sizeof(__pyx_k_update_crc), 0, 0, 1, 1}, {&__pyx_n_s_update_keys, __pyx_k_update_keys, sizeof(__pyx_k_update_keys), 0, 0, 1, 1}, {&__pyx_n_s_upperdirs, __pyx_k_upperdirs, sizeof(__pyx_k_upperdirs), 0, 0, 1, 1}, {&__pyx_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1}, {&__pyx_n_s_volume, __pyx_k_volume, sizeof(__pyx_k_volume), 0, 0, 1, 1}, {&__pyx_n_u_volume, __pyx_k_volume, sizeof(__pyx_k_volume), 0, 1, 0, 1}, {&__pyx_n_u_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 1, 0, 1}, {&__pyx_kp_u_w_b, __pyx_k_w_b, sizeof(__pyx_k_w_b), 0, 1, 0, 0}, {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1}, {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1}, {&__pyx_n_u_wavpack, __pyx_k_wavpack, sizeof(__pyx_k_wavpack), 0, 1, 0, 1}, {&__pyx_n_u_wb, __pyx_k_wb, sizeof(__pyx_k_wb), 0, 1, 0, 1}, {&__pyx_n_s_whence, __pyx_k_whence, sizeof(__pyx_k_whence), 0, 0, 1, 1}, {&__pyx_kp_u_whence_must_be_os_SEEK_SET_0_os, __pyx_k_whence_must_be_os_SEEK_SET_0_os, sizeof(__pyx_k_whence_must_be_os_SEEK_SET_0_os), 0, 1, 0, 0}, {&__pyx_n_u_win32, __pyx_k_win32, sizeof(__pyx_k_win32), 0, 1, 0, 1}, {&__pyx_n_s_windows_illegal_name_trans_tabl, __pyx_k_windows_illegal_name_trans_tabl, sizeof(__pyx_k_windows_illegal_name_trans_tabl), 0, 0, 1, 1}, {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_u_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 1, 0, 1}, {&__pyx_kp_u_x_b, __pyx_k_x_b, sizeof(__pyx_k_x_b), 0, 1, 0, 0}, {&__pyx_n_u_xb, __pyx_k_xb, sizeof(__pyx_k_xb), 0, 1, 0, 1}, {&__pyx_n_s_xid, __pyx_k_xid, sizeof(__pyx_k_xid), 0, 0, 1, 1}, {&__pyx_n_s_xids, __pyx_k_xids, sizeof(__pyx_k_xids), 0, 0, 1, 1}, {&__pyx_n_s_xlen, __pyx_k_xlen, sizeof(__pyx_k_xlen), 0, 0, 1, 1}, {&__pyx_n_s_zef_file, __pyx_k_zef_file, sizeof(__pyx_k_zef_file), 0, 0, 1, 1}, {&__pyx_n_s_zf, __pyx_k_zf, sizeof(__pyx_k_zf), 0, 0, 1, 1}, {&__pyx_n_s_zinfo, __pyx_k_zinfo, sizeof(__pyx_k_zinfo), 0, 0, 1, 1}, {&__pyx_kp_u_zip_file_version_1f, __pyx_k_zip_file_version_1f, sizeof(__pyx_k_zip_file_version_1f), 0, 1, 0, 0}, {&__pyx_n_s_zip_mode, __pyx_k_zip_mode, sizeof(__pyx_k_zip_mode), 0, 0, 1, 1}, {&__pyx_kp_u_zipfile, __pyx_k_zipfile, sizeof(__pyx_k_zipfile), 0, 1, 0, 0}, {&__pyx_kp_u_zipfiles_that_span_multiple_disk, __pyx_k_zipfiles_that_span_multiple_disk, sizeof(__pyx_k_zipfiles_that_span_multiple_disk), 0, 1, 0, 0}, {&__pyx_n_s_zipinfo, __pyx_k_zipinfo, sizeof(__pyx_k_zipinfo), 0, 0, 1, 1}, {&__pyx_n_s_zlib, __pyx_k_zlib, sizeof(__pyx_k_zlib), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 19, __pyx_L1_error) __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 318, __pyx_L1_error) __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 1254, __pyx_L1_error) __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 1512, __pyx_L1_error) __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(0, 193, __pyx_L1_error) __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 208, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 357, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 446, __pyx_L1_error) __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 470, __pyx_L1_error) __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 580, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 588, __pyx_L1_error) __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 726, __pyx_L1_error) __pyx_builtin_EOFError = __Pyx_GetBuiltinName(__pyx_n_s_EOFError); if (!__pyx_builtin_EOFError) __PYX_ERR(0, 931, __pyx_L1_error) __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 942, __pyx_L1_error) __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 1133, __pyx_L1_error) __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 1172, __pyx_L1_error) __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 1241, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 1248, __pyx_L1_error) __pyx_builtin_vars = __Pyx_GetBuiltinName(__pyx_n_s_vars); if (!__pyx_builtin_vars) __PYX_ERR(0, 1551, __pyx_L1_error) __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_n_s_filter); if (!__pyx_builtin_filter) __PYX_ERR(0, 1673, __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); __pyx_tuple__2 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); __pyx_tuple__3 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_2); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); __pyx_slice__4 = PySlice_New(__pyx_int_0, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__4)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__4); __Pyx_GIVEREF(__pyx_slice__4); __pyx_slice__5 = PySlice_New(__pyx_int_neg_2, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__5); __Pyx_GIVEREF(__pyx_slice__5); __pyx_tuple__7 = PyTuple_Pack(6, __pyx_int_1980, __pyx_int_1, __pyx_int_1, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_ZIP_does_not_support_timestamps); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); __pyx_slice__12 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__12); __Pyx_GIVEREF(__pyx_slice__12); __pyx_slice__14 = PySlice_New(Py_None, __pyx_int_8, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__14); __Pyx_GIVEREF(__pyx_slice__14); __pyx_slice__15 = PySlice_New(__pyx_int_8, Py_None, Py_None); if (unlikely(!__pyx_slice__15)) __PYX_ERR(0, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__15); __Pyx_GIVEREF(__pyx_slice__15); __pyx_tuple__16 = PyTuple_Pack(1, __pyx_int_256); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_s_ch, __pyx_n_s_crc); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_crc32, 473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 473, __pyx_L1_error) __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_c); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_update_keys, 477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 477, __pyx_L1_error) __pyx_tuple__21 = PyTuple_Pack(5, __pyx_n_s_data, __pyx_n_s_result, __pyx_n_s_append, __pyx_n_s_c, __pyx_n_s_k); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_decrypter, 487, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 487, __pyx_L1_error) __pyx_slice__23 = PySlice_New(__pyx_int_2, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__23)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__23); __Pyx_GIVEREF(__pyx_slice__23); __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_Compression_requires_the_missing); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_Compression_requires_the_missing_2); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_Compression_requires_the_missing_3); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_That_compression_method_is_not_s); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_read_from_closed_file); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_seek_on_closed_file); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_whence_must_be_os_SEEK_SET_0_os); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_tell_on_closed_file); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_ZipFile_can_only_read); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1047, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); __pyx_slice__37 = PySlice_New(__pyx_int_1, __pyx_int_12, Py_None); if (unlikely(!__pyx_slice__37)) __PYX_ERR(0, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__37); __Pyx_GIVEREF(__pyx_slice__37); __pyx_slice__38 = PySlice_New(__pyx_int_15, __pyx_int_18, Py_None); if (unlikely(!__pyx_slice__38)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__38); __Pyx_GIVEREF(__pyx_slice__38); __pyx_slice__40 = PySlice_New(Py_None, __pyx_int_6, Py_None); if (unlikely(!__pyx_slice__40)) __PYX_ERR(0, 1220, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__40); __Pyx_GIVEREF(__pyx_slice__40); __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_Writing_not_supported); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_Attempt_to_use_ZIP_archive_that); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_compressed_patched_data_flag_bit); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_strong_encryption_flag_bit_6); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_encoding_args_invalid_for_binary); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1638, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); __pyx_tuple__47 = PyTuple_Pack(1, __pyx_n_u_r); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_Can_t_listdir_a_file); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); __pyx_tuple__49 = PyTuple_Pack(2, __pyx_kp_u_l, __pyx_kp_u_list); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); __pyx_tuple__50 = PyTuple_Pack(2, __pyx_kp_u_e, __pyx_kp_u_extract); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 1703, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); __pyx_tuple__51 = PyTuple_Pack(2, __pyx_kp_u_zipfile, __pyx_kp_u_output_dir); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1707, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); __pyx_tuple__52 = PyTuple_Pack(2, __pyx_kp_u_t, __pyx_kp_u_test); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 1709, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_Done_testing); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 1719, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_HH); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); __pyx_tuple__55 = PyTuple_Pack(10, __pyx_n_s_extra, __pyx_n_s_xids, __pyx_n_s_unpack, __pyx_n_s_modified, __pyx_n_s_buffer, __pyx_n_s_start, __pyx_n_s_i, __pyx_n_s_xid, __pyx_n_s_xlen, __pyx_n_s_j); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_strip_extra, 169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 169, __pyx_L1_error) __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_fp); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_check_zipfile, 189, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 189, __pyx_L1_error) __pyx_tuple__59 = PyTuple_Pack(3, __pyx_n_s_filename, __pyx_n_s_result, __pyx_n_s_fp); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_is_zipfile, 198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 198, __pyx_L1_error) __pyx_tuple__61 = PyTuple_Pack(17, __pyx_n_s_fpin, __pyx_n_s_offset, __pyx_n_s_endrec, __pyx_n_s_data, __pyx_n_s_sig, __pyx_n_s_diskno, __pyx_n_s_reloff, __pyx_n_s_disks, __pyx_n_s_sz, __pyx_n_s_create_version, __pyx_n_s_read_version, __pyx_n_s_disk_num, __pyx_n_s_disk_dir, __pyx_n_s_dircount, __pyx_n_s_dircount2, __pyx_n_s_dirsize, __pyx_n_s_diroffset); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(3, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_EndRecData64, 215, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 215, __pyx_L1_error) __pyx_tuple__63 = PyTuple_Pack(9, __pyx_n_s_fpin, __pyx_n_s_filesize, __pyx_n_s_data, __pyx_n_s_endrec, __pyx_n_s_maxCommentStart, __pyx_n_s_start, __pyx_n_s_recData, __pyx_n_s_commentSize, __pyx_n_s_comment); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__63); __Pyx_GIVEREF(__pyx_tuple__63); __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_EndRecData, 258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 258, __pyx_L1_error) __pyx_tuple__65 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__65); __Pyx_GIVEREF(__pyx_tuple__65); __pyx_tuple__66 = PyTuple_Pack(20, __pyx_n_u_orig_filename, __pyx_n_u_filename, __pyx_n_u_date_time, __pyx_n_u_compress_type, __pyx_n_u_compresslevel, __pyx_n_u_comment, __pyx_n_u_extra, __pyx_n_u_create_system, __pyx_n_u_create_version, __pyx_n_u_extract_version, __pyx_n_u_reserved, __pyx_n_u_flag_bits, __pyx_n_u_volume, __pyx_n_u_internal_attr, __pyx_n_u_external_attr, __pyx_n_u_header_offset, __pyx_n_u_CRC, __pyx_n_u_compress_size, __pyx_n_u_file_size, __pyx_n_u_raw_time); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); __pyx_tuple__67 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_orig_filename, __pyx_n_s_date_time); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__67); __Pyx_GIVEREF(__pyx_tuple__67); __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_init_2, 344, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 344, __pyx_L1_error) __pyx_tuple__69 = PyTuple_Pack(1, ((PyObject*)__pyx_tuple__7)); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__69); __Pyx_GIVEREF(__pyx_tuple__69); __pyx_tuple__70 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_hi, __pyx_n_s_lo, __pyx_n_s_isdir); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_repr, 382, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 382, __pyx_L1_error) __pyx_tuple__72 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_extra, __pyx_n_s_unpack, __pyx_n_s_tp, __pyx_n_s_ln, __pyx_n_s_data, __pyx_n_s_field); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_decodeExtra, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 404, __pyx_L1_error) __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__74); __Pyx_GIVEREF(__pyx_tuple__74); __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_is_dir, 433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 433, __pyx_L1_error) __pyx_tuple__76 = PyTuple_Pack(2, __pyx_n_s_crc, __pyx_n_s_j); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__76); __Pyx_GIVEREF(__pyx_tuple__76); __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_gen_crc, 445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 445, __pyx_L1_error) __pyx_tuple__78 = PyTuple_Pack(12, __pyx_n_s_pwd, __pyx_n_s_key0, __pyx_n_s_key1, __pyx_n_s_key2, __pyx_n_s_crctable_2, __pyx_n_s_crc32, __pyx_n_s_crc32, __pyx_n_s_update_keys, __pyx_n_s_update_keys, __pyx_n_s_p, __pyx_n_s_decrypter, __pyx_n_s_decrypter); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__78); __Pyx_GIVEREF(__pyx_tuple__78); __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_ZipDecrypter, 463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 463, __pyx_L1_error) __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__80); __Pyx_GIVEREF(__pyx_tuple__80); __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_init_2, 503, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 503, __pyx_L1_error) __pyx_tuple__82 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_props); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__82); __Pyx_GIVEREF(__pyx_tuple__82); __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_init, 506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 506, __pyx_L1_error) __pyx_tuple__84 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__84); __Pyx_GIVEREF(__pyx_tuple__84); __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_compress, 513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 513, __pyx_L1_error) __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__86); __Pyx_GIVEREF(__pyx_tuple__86); __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_flush, 518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 518, __pyx_L1_error) __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__88); __Pyx_GIVEREF(__pyx_tuple__88); __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_init_2, 526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 526, __pyx_L1_error) __pyx_tuple__90 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_psize, __pyx_n_s_result); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__90); __Pyx_GIVEREF(__pyx_tuple__90); __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_decompress, 531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 531, __pyx_L1_error) __pyx_tuple__92 = PyTuple_Pack(1, __pyx_n_s_compression); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__92); __Pyx_GIVEREF(__pyx_tuple__92); __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_check_compression, 575, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 575, __pyx_L1_error) __pyx_tuple__94 = PyTuple_Pack(2, __pyx_n_s_compress_type, __pyx_n_s_compresslevel_2); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_get_compressor, 591, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 591, __pyx_L1_error) __pyx_tuple__96 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__96); __Pyx_GIVEREF(__pyx_tuple__96); __pyx_tuple__97 = PyTuple_Pack(2, __pyx_n_s_compress_type, __pyx_n_s_descr); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__97); __Pyx_GIVEREF(__pyx_tuple__97); __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_get_decompressor, 607, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 607, __pyx_L1_error) __pyx_tuple__99 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_pos, __pyx_n_s_close, __pyx_n_s_lock); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__99); __Pyx_GIVEREF(__pyx_tuple__99); __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_init_2, 628, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 628, __pyx_L1_error) __pyx_tuple__101 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_offset, __pyx_n_s_whence); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__101); __Pyx_GIVEREF(__pyx_tuple__101); __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_seek, 636, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 636, __pyx_L1_error) __pyx_tuple__103 = PyTuple_Pack(1, ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__103); __Pyx_GIVEREF(__pyx_tuple__103); __pyx_tuple__104 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_data); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__104); __Pyx_GIVEREF(__pyx_tuple__104); __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_read, 642, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 642, __pyx_L1_error) __pyx_tuple__106 = PyTuple_Pack(1, ((PyObject *)__pyx_int_neg_1)); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__106); __Pyx_GIVEREF(__pyx_tuple__106); __pyx_tuple__107 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fileobj); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__107); __Pyx_GIVEREF(__pyx_tuple__107); __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_close, 649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 649, __pyx_L1_error) __pyx_tuple__109 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fp); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__109); __Pyx_GIVEREF(__pyx_tuple__109); __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_init_2, 659, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 659, __pyx_L1_error) __pyx_tuple__111 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_n); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__111); __Pyx_GIVEREF(__pyx_tuple__111); __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_write, 663, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 663, __pyx_L1_error) __pyx_tuple__113 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__113); __Pyx_GIVEREF(__pyx_tuple__113); __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_tell, 668, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 668, __pyx_L1_error) __pyx_tuple__115 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__115); __Pyx_GIVEREF(__pyx_tuple__115); __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_flush, 671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 671, __pyx_L1_error) __pyx_tuple__117 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__117); __Pyx_GIVEREF(__pyx_tuple__117); __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_close, 674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 674, __pyx_L1_error) __pyx_tuple__119 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_fileobj, __pyx_n_s_mode, __pyx_n_s_zipinfo, __pyx_n_s_pwd, __pyx_n_s_close_fileobj, __pyx_n_s_check_byte, __pyx_n_s_h); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__119); __Pyx_GIVEREF(__pyx_tuple__119); __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_init_2, 693, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 693, __pyx_L1_error) __pyx_tuple__121 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__121); __Pyx_GIVEREF(__pyx_tuple__121); __pyx_tuple__122 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_header); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__122); __Pyx_GIVEREF(__pyx_tuple__122); __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_init_decrypter, 741, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 741, __pyx_L1_error) __pyx_tuple__124 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__124); __Pyx_GIVEREF(__pyx_tuple__124); __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_repr, 752, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 752, __pyx_L1_error) __pyx_tuple__126 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_limit, __pyx_n_s_i, __pyx_n_s_line); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__126); __Pyx_GIVEREF(__pyx_tuple__126); __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_readline, 767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 767, __pyx_L1_error) __pyx_tuple__128 = PyTuple_Pack(1, ((PyObject *)__pyx_int_neg_1)); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__128); __Pyx_GIVEREF(__pyx_tuple__128); __pyx_tuple__129 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_chunk); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__129); __Pyx_GIVEREF(__pyx_tuple__129); __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_peek, 783, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 783, __pyx_L1_error) __pyx_tuple__131 = PyTuple_Pack(1, ((PyObject *)__pyx_int_1)); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__131); __Pyx_GIVEREF(__pyx_tuple__131); __pyx_tuple__132 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__132); __Pyx_GIVEREF(__pyx_tuple__132); __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_readable, 796, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 796, __pyx_L1_error) __pyx_tuple__134 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_buf, __pyx_n_s_end, __pyx_n_s_data); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__134); __Pyx_GIVEREF(__pyx_tuple__134); __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_read, 801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 801, __pyx_L1_error) __pyx_tuple__136 = PyTuple_Pack(1, ((PyObject *)__pyx_int_neg_1)); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__136); __Pyx_GIVEREF(__pyx_tuple__136); __pyx_tuple__137 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_newdata); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__137); __Pyx_GIVEREF(__pyx_tuple__137); __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_update_crc, 838, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 838, __pyx_L1_error) __pyx_tuple__139 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_buf, __pyx_n_s_data, __pyx_n_s_end); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__139); __Pyx_GIVEREF(__pyx_tuple__139); __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_read1_2, 848, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 848, __pyx_L1_error) __pyx_tuple__141 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_data); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__141); __Pyx_GIVEREF(__pyx_tuple__141); __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_read1, 885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 885, __pyx_L1_error) __pyx_tuple__143 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_data); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__143); __Pyx_GIVEREF(__pyx_tuple__143); __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_read2, 921, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 921, __pyx_L1_error) __pyx_tuple__145 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__145); __Pyx_GIVEREF(__pyx_tuple__145); __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_close, 937, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 937, __pyx_L1_error) __pyx_tuple__147 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__147); __Pyx_GIVEREF(__pyx_tuple__147); __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_seekable, 944, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 944, __pyx_L1_error) __pyx_tuple__149 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_offset, __pyx_n_s_whence, __pyx_n_s_curr_pos, __pyx_n_s_new_pos, __pyx_n_s_read_offset, __pyx_n_s_buff_offset, __pyx_n_s_read_len); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 949, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__149); __Pyx_GIVEREF(__pyx_tuple__149); __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_seek, 949, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 949, __pyx_L1_error) __pyx_tuple__151 = PyTuple_Pack(1, ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 949, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__151); __Pyx_GIVEREF(__pyx_tuple__151); __pyx_tuple__152 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_filepos); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__152); __Pyx_GIVEREF(__pyx_tuple__152); __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_tell, 999, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 999, __pyx_L1_error) __pyx_tuple__154 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_mode, __pyx_n_s_compression, __pyx_n_s_allowZip64, __pyx_n_s_compresslevel_2, __pyx_n_s_strict_timestamps, __pyx_n_s_modeDict, __pyx_n_s_filemode, __pyx_n_s_fp); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__154); __Pyx_GIVEREF(__pyx_tuple__154); __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(6, 1, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_init_2, 1034, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 1034, __pyx_L1_error) __pyx_tuple__156 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__156); __Pyx_GIVEREF(__pyx_tuple__156); __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_enter, 1103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 1103, __pyx_L1_error) __pyx_tuple__158 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_type, __pyx_n_s_value, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__158); __Pyx_GIVEREF(__pyx_tuple__158); __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_exit, 1106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 1106, __pyx_L1_error) __pyx_tuple__160 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__160); __Pyx_GIVEREF(__pyx_tuple__160); __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_repr, 1109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 1109, __pyx_L1_error) __pyx_tuple__162 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_fp, __pyx_n_s_endrec, __pyx_n_s_size_cd, __pyx_n_s_offset_cd, __pyx_n_s_concat, __pyx_n_s_inferred, __pyx_n_s_data, __pyx_n_s_total, __pyx_n_s_centdir, __pyx_n_s_filename, __pyx_n_s_flags, __pyx_n_s_orig_filename, __pyx_n_s_null_byte, __pyx_n_s_x, __pyx_n_s_t_2, __pyx_n_s_d); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__162); __Pyx_GIVEREF(__pyx_tuple__162); __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_RealGetContents, 1123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 1123, __pyx_L1_error) __pyx_tuple__164 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__164); __Pyx_GIVEREF(__pyx_tuple__164); __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_namelist, 1206, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 1206, __pyx_L1_error) __pyx_tuple__166 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__166); __Pyx_GIVEREF(__pyx_tuple__166); __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_infolist, 1210, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 1210, __pyx_L1_error) __pyx_tuple__168 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_zinfo, __pyx_n_s_date); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__168); __Pyx_GIVEREF(__pyx_tuple__168); __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_printdir, 1217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 1217, __pyx_L1_error) __pyx_tuple__170 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__170); __Pyx_GIVEREF(__pyx_tuple__170); __pyx_tuple__171 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_chunk_size, __pyx_n_s_zinfo, __pyx_n_s_f); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__171); __Pyx_GIVEREF(__pyx_tuple__171); __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_testzip, 1224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 1224, __pyx_L1_error) __pyx_tuple__173 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name_2, __pyx_n_s_info); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__173); __Pyx_GIVEREF(__pyx_tuple__173); __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_getinfo, 1237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 1237, __pyx_L1_error) __pyx_tuple__175 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pwd); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__175); __Pyx_GIVEREF(__pyx_tuple__175); __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_setpassword, 1245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 1245, __pyx_L1_error) __pyx_tuple__177 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__177); __Pyx_GIVEREF(__pyx_tuple__177); __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_comment, 1255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 1255, __pyx_L1_error) __pyx_tuple__179 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_comment, __pyx_n_s_warnings); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__179); __Pyx_GIVEREF(__pyx_tuple__179); __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_comment, 1260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 1260, __pyx_L1_error) __pyx_tuple__181 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_name_2, __pyx_n_s_pwd, __pyx_n_s_fp); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__181); __Pyx_GIVEREF(__pyx_tuple__181); __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_read, 1275, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 1275, __pyx_L1_error) __pyx_tuple__183 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__183); __Pyx_GIVEREF(__pyx_tuple__183); __pyx_tuple__184 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_name_2, __pyx_n_s_mode, __pyx_n_s_pwd, __pyx_n_s_force_zip64, __pyx_n_s_zinfo, __pyx_n_s_zef_file, __pyx_n_s_fheader, __pyx_n_s_fname, __pyx_n_s_fname_str, __pyx_n_s_is_encrypted); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__184); __Pyx_GIVEREF(__pyx_tuple__184); __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(4, 1, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_open, 1280, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 1280, __pyx_L1_error) __pyx_tuple__186 = PyTuple_Pack(2, ((PyObject*)__pyx_n_u_r), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__186); __Pyx_GIVEREF(__pyx_tuple__186); __pyx_tuple__187 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_member, __pyx_n_s_path, __pyx_n_s_pwd); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__187); __Pyx_GIVEREF(__pyx_tuple__187); __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_extract_2, 1359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 1359, __pyx_L1_error) __pyx_tuple__189 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__189); __Pyx_GIVEREF(__pyx_tuple__189); __pyx_tuple__190 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_members, __pyx_n_s_pwd, __pyx_n_s_zipinfo); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__190); __Pyx_GIVEREF(__pyx_tuple__190); __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_extractall, 1373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 1373, __pyx_L1_error) __pyx_tuple__192 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__192); __Pyx_GIVEREF(__pyx_tuple__192); __pyx_tuple__193 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_member, __pyx_n_s_targetpath, __pyx_n_s_pwd, __pyx_n_s_arcname, __pyx_n_s_invalid_path_parts, __pyx_n_s_upperdirs, __pyx_n_s_source, __pyx_n_s_target, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__193); __Pyx_GIVEREF(__pyx_tuple__193); __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_extract_member, 1393, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 1393, __pyx_L1_error) __pyx_tuple__195 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__195); __Pyx_GIVEREF(__pyx_tuple__195); __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_del, 1433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 1433, __pyx_L1_error) __pyx_tuple__197 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fp); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__197); __Pyx_GIVEREF(__pyx_tuple__197); __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_close, 1437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 1437, __pyx_L1_error) __pyx_tuple__199 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fp); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__199); __Pyx_GIVEREF(__pyx_tuple__199); __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_fpclose, 1449, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 1449, __pyx_L1_error) __pyx_tuple__201 = PyTuple_Pack(1, __pyx_n_s_path); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__201); __Pyx_GIVEREF(__pyx_tuple__201); __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_parents, 1455, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 1455, __pyx_L1_error) __pyx_tuple__203 = PyTuple_Pack(2, __pyx_n_s_path, __pyx_n_s_tail); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__203); __Pyx_GIVEREF(__pyx_tuple__203); __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_ancestry, 1473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1473, __pyx_L1_error) __pyx_tuple__204 = PyTuple_Pack(2, __pyx_n_s_minuend, __pyx_n_s_subtrahend); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 1498, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__204); __Pyx_GIVEREF(__pyx_tuple__204); __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_difference, 1498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 1498, __pyx_L1_error) __pyx_tuple__206 = PyTuple_Pack(5, __pyx_n_s_names, __pyx_n_s_parents_2, __pyx_n_s_as_dirs, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__206); __Pyx_GIVEREF(__pyx_tuple__206); __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_implied_dirs, 1513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 1513, __pyx_L1_error) __pyx_tuple__208 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_names); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 1518, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__208); __Pyx_GIVEREF(__pyx_tuple__208); __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_namelist, 1518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 1518, __pyx_L1_error) __pyx_tuple__210 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__210); __Pyx_GIVEREF(__pyx_tuple__210); __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_name_set, 1522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 1522, __pyx_L1_error) __pyx_tuple__212 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_name_2, __pyx_n_s_names, __pyx_n_s_dirname, __pyx_n_s_dir_match); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__212); __Pyx_GIVEREF(__pyx_tuple__212); __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_resolve_dir, 1525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 1525, __pyx_L1_error) __pyx_tuple__214 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_res); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__214); __Pyx_GIVEREF(__pyx_tuple__214); __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_make, 1536, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 1536, __pyx_L1_error) __pyx_tuple__216 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__216); __Pyx_GIVEREF(__pyx_tuple__216); __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_namelist, 1561, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(0, 1561, __pyx_L1_error) __pyx_tuple__218 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__218); __Pyx_GIVEREF(__pyx_tuple__218); __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_name_set, 1567, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(0, 1567, __pyx_L1_error) __pyx_tuple__220 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_root, __pyx_n_s_at); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__220); __Pyx_GIVEREF(__pyx_tuple__220); __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_init_2, 1623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(0, 1623, __pyx_L1_error) __pyx_tuple__222 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_u_)); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__222); __Pyx_GIVEREF(__pyx_tuple__222); __pyx_tuple__223 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_mode, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_pwd, __pyx_n_s_zip_mode, __pyx_n_s_stream); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__223); __Pyx_GIVEREF(__pyx_tuple__223); __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_open, 1627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 1627, __pyx_L1_error) __pyx_tuple__225 = PyTuple_Pack(1, ((PyObject*)__pyx_n_u_r)); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__225); __Pyx_GIVEREF(__pyx_tuple__225); __pyx_tuple__226 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__226); __Pyx_GIVEREF(__pyx_tuple__226); __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_name_2, 1643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 1643, __pyx_L1_error) __pyx_tuple__228 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_strm); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 1646, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__228); __Pyx_GIVEREF(__pyx_tuple__228); __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_read_text, 1646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(0, 1646, __pyx_L1_error) __pyx_tuple__230 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_strm); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 1650, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__230); __Pyx_GIVEREF(__pyx_tuple__230); __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_read_bytes, 1650, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 1650, __pyx_L1_error) __pyx_tuple__232 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_path); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 1654, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__232); __Pyx_GIVEREF(__pyx_tuple__232); __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_is_child, 1654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(0, 1654, __pyx_L1_error) __pyx_tuple__234 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_at); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 1657, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__234); __Pyx_GIVEREF(__pyx_tuple__234); __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_next, 1657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(0, 1657, __pyx_L1_error) __pyx_tuple__236 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__236); __Pyx_GIVEREF(__pyx_tuple__236); __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_is_dir, 1660, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(0, 1660, __pyx_L1_error) __pyx_tuple__238 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__238); __Pyx_GIVEREF(__pyx_tuple__238); __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_is_file, 1663, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(0, 1663, __pyx_L1_error) __pyx_tuple__240 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 1666, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__240); __Pyx_GIVEREF(__pyx_tuple__240); __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_exists, 1666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(0, 1666, __pyx_L1_error) __pyx_tuple__242 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_subs); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__242); __Pyx_GIVEREF(__pyx_tuple__242); __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_iterdir, 1669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(0, 1669, __pyx_L1_error) __pyx_tuple__244 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__244); __Pyx_GIVEREF(__pyx_tuple__244); __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_str, 1675, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(0, 1675, __pyx_L1_error) __pyx_tuple__246 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 1678, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__246); __Pyx_GIVEREF(__pyx_tuple__246); __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_repr, 1678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(0, 1678, __pyx_L1_error) __pyx_tuple__248 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_add, __pyx_n_s_next_2); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__248); __Pyx_GIVEREF(__pyx_tuple__248); __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_joinpath, 1681, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(0, 1681, __pyx_L1_error) __pyx_tuple__250 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_parent_at); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__250); __Pyx_GIVEREF(__pyx_tuple__250); __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_parent, 1688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(0, 1688, __pyx_L1_error) __pyx_tuple__252 = PyTuple_Pack(9, __pyx_n_s_args, __pyx_n_s_argparse, __pyx_n_s_description, __pyx_n_s_parser, __pyx_n_s_group, __pyx_n_s_src, __pyx_n_s_zf, __pyx_n_s_badfile, __pyx_n_s_curdir); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__252); __Pyx_GIVEREF(__pyx_tuple__252); __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_turbozipfile_py, __pyx_n_s_main_2, 1695, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(0, 1695, __pyx_L1_error) __pyx_tuple__254 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__254); __Pyx_GIVEREF(__pyx_tuple__254); __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { __pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) __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_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __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_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_45 = PyInt_FromLong(45); if (unlikely(!__pyx_int_45)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_46 = PyInt_FromLong(46); if (unlikely(!__pyx_int_46)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_63 = PyInt_FromLong(63); if (unlikely(!__pyx_int_63)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_97 = PyInt_FromLong(97); if (unlikely(!__pyx_int_97)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_98 = PyInt_FromLong(98); if (unlikely(!__pyx_int_98)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_512 = PyInt_FromLong(512); if (unlikely(!__pyx_int_512)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1980 = PyInt_FromLong(1980); if (unlikely(!__pyx_int_1980)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_4096 = PyInt_FromLong(4096); if (unlikely(!__pyx_int_4096)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_65535 = PyInt_FromLong(65535L); if (unlikely(!__pyx_int_65535)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_65536 = PyInt_FromLong(65536L); if (unlikely(!__pyx_int_65536)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_16777216 = PyInt_FromLong(16777216L); if (unlikely(!__pyx_int_16777216)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_134695760 = PyInt_FromLong(134695760L); if (unlikely(!__pyx_int_134695760)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_134775813 = PyInt_FromLong(134775813L); if (unlikely(!__pyx_int_134775813)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_305419896 = PyInt_FromLong(305419896L); if (unlikely(!__pyx_int_305419896)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_591751049 = PyInt_FromLong(591751049L); if (unlikely(!__pyx_int_591751049)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_878082192 = PyInt_FromLong(878082192L); if (unlikely(!__pyx_int_878082192)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1073741824 = PyInt_FromLong(1073741824L); if (unlikely(!__pyx_int_1073741824)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_2147483647 = PyInt_FromLong(2147483647L); if (unlikely(!__pyx_int_2147483647)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_3988292384 = PyInt_FromString((char *)"3988292384", 0, 0); if (unlikely(!__pyx_int_3988292384)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_4294967295 = PyInt_FromString((char *)"4294967295", 0, 0); if (unlikely(!__pyx_int_4294967295)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_18446744073709551615 = PyInt_FromString((char *)"18446744073709551615", 0, 0); if (unlikely(!__pyx_int_18446744073709551615)) __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) __pyx_int_neg_2 = PyInt_FromLong(-2); if (unlikely(!__pyx_int_neg_2)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_neg_15 = PyInt_FromLong(-15); if (unlikely(!__pyx_int_neg_15)) __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); static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); if (PyType_Ready(&__pyx_type_12turbozipfile___pyx_scope_struct___ZipDecrypter) < 0) __PYX_ERR(0, 463, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_12turbozipfile___pyx_scope_struct___ZipDecrypter.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12turbozipfile___pyx_scope_struct___ZipDecrypter.tp_dictoffset && __pyx_type_12turbozipfile___pyx_scope_struct___ZipDecrypter.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_12turbozipfile___pyx_scope_struct___ZipDecrypter.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_12turbozipfile___pyx_scope_struct___ZipDecrypter = &__pyx_type_12turbozipfile___pyx_scope_struct___ZipDecrypter; if (PyType_Ready(&__pyx_type_12turbozipfile___pyx_scope_struct_1__extract_member) < 0) __PYX_ERR(0, 1393, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_12turbozipfile___pyx_scope_struct_1__extract_member.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12turbozipfile___pyx_scope_struct_1__extract_member.tp_dictoffset && __pyx_type_12turbozipfile___pyx_scope_struct_1__extract_member.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_12turbozipfile___pyx_scope_struct_1__extract_member.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_12turbozipfile___pyx_scope_struct_1__extract_member = &__pyx_type_12turbozipfile___pyx_scope_struct_1__extract_member; if (PyType_Ready(&__pyx_type_12turbozipfile___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 1412, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_12turbozipfile___pyx_scope_struct_2_genexpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12turbozipfile___pyx_scope_struct_2_genexpr.tp_dictoffset && __pyx_type_12turbozipfile___pyx_scope_struct_2_genexpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_12turbozipfile___pyx_scope_struct_2_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_12turbozipfile___pyx_scope_struct_2_genexpr = &__pyx_type_12turbozipfile___pyx_scope_struct_2_genexpr; if (PyType_Ready(&__pyx_type_12turbozipfile___pyx_scope_struct_3__ancestry) < 0) __PYX_ERR(0, 1473, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_12turbozipfile___pyx_scope_struct_3__ancestry.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12turbozipfile___pyx_scope_struct_3__ancestry.tp_dictoffset && __pyx_type_12turbozipfile___pyx_scope_struct_3__ancestry.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_12turbozipfile___pyx_scope_struct_3__ancestry.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_12turbozipfile___pyx_scope_struct_3__ancestry = &__pyx_type_12turbozipfile___pyx_scope_struct_3__ancestry; if (PyType_Ready(&__pyx_type_12turbozipfile___pyx_scope_struct_4__implied_dirs) < 0) __PYX_ERR(0, 1513, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_12turbozipfile___pyx_scope_struct_4__implied_dirs.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12turbozipfile___pyx_scope_struct_4__implied_dirs.tp_dictoffset && __pyx_type_12turbozipfile___pyx_scope_struct_4__implied_dirs.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_12turbozipfile___pyx_scope_struct_4__implied_dirs.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_12turbozipfile___pyx_scope_struct_4__implied_dirs = &__pyx_type_12turbozipfile___pyx_scope_struct_4__implied_dirs; if (PyType_Ready(&__pyx_type_12turbozipfile___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(0, 1515, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_12turbozipfile___pyx_scope_struct_5_genexpr.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12turbozipfile___pyx_scope_struct_5_genexpr.tp_dictoffset && __pyx_type_12turbozipfile___pyx_scope_struct_5_genexpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_12turbozipfile___pyx_scope_struct_5_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_12turbozipfile___pyx_scope_struct_5_genexpr = &__pyx_type_12turbozipfile___pyx_scope_struct_5_genexpr; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); __Pyx_RefNannyFinishContext(); return 0; } #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initturbozipfile(void) CYTHON_SMALL_CODE; __Pyx_PyMODINIT_FUNC initturbozipfile(void) #else __Pyx_PyMODINIT_FUNC PyInit_turbozipfile(void) CYTHON_SMALL_CODE; __Pyx_PyMODINIT_FUNC PyInit_turbozipfile(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_turbozipfile(PyObject *__pyx_pyinit_module) #endif #endif { 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; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'turbozipfile' 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_turbozipfile(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 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD PyEval_InitThreads(); #endif #endif #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("turbozipfile", __pyx_methods, __pyx_k_Read_and_write_ZIP_files, 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) Py_INCREF(__pyx_b); __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_cython_runtime); if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); 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_turbozipfile) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __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, "turbozipfile")) { if (unlikely(PyDict_SetItemString(modules, "turbozipfile", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) (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)) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_type_import_code(); (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif __pyx_t_1 = __Pyx_Import(__pyx_n_s_binascii, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_binascii, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_importlib_util, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_importlib, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_io, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_io, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_itertools, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_posixpath, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_posixpath, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_shutil, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_shutil, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_stat, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_stat, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_threading, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_contextlib, 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_contextlib, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; { __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); { __pyx_t_1 = __Pyx_Import(__pyx_n_s_zlib, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_zlib, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L2_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_zlib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_crc32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_crc32, __pyx_t_5) < 0) __PYX_ERR(0, 18, __pyx_L2_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __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_L7_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_6) { __Pyx_AddTraceback("turbozipfile", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 19, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_zlib, Py_None) < 0) __PYX_ERR(0, 20, __pyx_L4_except_error) __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_binascii); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 21, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_crc32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 21, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_crc32, __pyx_t_9) < 0) __PYX_ERR(0, 21, __pyx_L4_except_error) __Pyx_DECREF(__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; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3_exception_handled; } goto __pyx_L4_except_error; __pyx_L4_except_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_L3_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_L7_try_end:; } { __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); { __pyx_t_7 = __Pyx_Import(__pyx_n_s_bz2, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_bz2, __pyx_t_7) < 0) __PYX_ERR(0, 24, __pyx_L10_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __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_L15_try_end; __pyx_L10_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __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; __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_6) { __Pyx_AddTraceback("turbozipfile", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 25, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_bz2, Py_None) < 0) __PYX_ERR(0, 26, __pyx_L12_except_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11_exception_handled; } goto __pyx_L12_except_error; __pyx_L12_except_error:; __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_L11_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_L15_try_end:; } { __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); { __pyx_t_5 = __Pyx_Import(__pyx_n_s_lzma, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_lzma, __pyx_t_5) < 0) __PYX_ERR(0, 29, __pyx_L18_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __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_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __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; __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_6) { __Pyx_AddTraceback("turbozipfile", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 30, __pyx_L20_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_lzma, Py_None) < 0) __PYX_ERR(0, 31, __pyx_L20_except_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L19_exception_handled; } goto __pyx_L20_except_error; __pyx_L20_except_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_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:; } __pyx_t_7 = PyList_New(13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_n_u_BadZipFile); __Pyx_GIVEREF(__pyx_n_u_BadZipFile); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_u_BadZipFile); __Pyx_INCREF(__pyx_n_u_BadZipfile); __Pyx_GIVEREF(__pyx_n_u_BadZipfile); PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_u_BadZipfile); __Pyx_INCREF(__pyx_n_u_error); __Pyx_GIVEREF(__pyx_n_u_error); PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_u_error); __Pyx_INCREF(__pyx_n_u_ZIP_STORED); __Pyx_GIVEREF(__pyx_n_u_ZIP_STORED); PyList_SET_ITEM(__pyx_t_7, 3, __pyx_n_u_ZIP_STORED); __Pyx_INCREF(__pyx_n_u_ZIP_DEFLATED); __Pyx_GIVEREF(__pyx_n_u_ZIP_DEFLATED); PyList_SET_ITEM(__pyx_t_7, 4, __pyx_n_u_ZIP_DEFLATED); __Pyx_INCREF(__pyx_n_u_ZIP_BZIP2); __Pyx_GIVEREF(__pyx_n_u_ZIP_BZIP2); PyList_SET_ITEM(__pyx_t_7, 5, __pyx_n_u_ZIP_BZIP2); __Pyx_INCREF(__pyx_n_u_ZIP_LZMA); __Pyx_GIVEREF(__pyx_n_u_ZIP_LZMA); PyList_SET_ITEM(__pyx_t_7, 6, __pyx_n_u_ZIP_LZMA); __Pyx_INCREF(__pyx_n_u_is_zipfile); __Pyx_GIVEREF(__pyx_n_u_is_zipfile); PyList_SET_ITEM(__pyx_t_7, 7, __pyx_n_u_is_zipfile); __Pyx_INCREF(__pyx_n_u_ZipInfo); __Pyx_GIVEREF(__pyx_n_u_ZipInfo); PyList_SET_ITEM(__pyx_t_7, 8, __pyx_n_u_ZipInfo); __Pyx_INCREF(__pyx_n_u_ZipFile); __Pyx_GIVEREF(__pyx_n_u_ZipFile); PyList_SET_ITEM(__pyx_t_7, 9, __pyx_n_u_ZipFile); __Pyx_INCREF(__pyx_n_u_PyZipFile); __Pyx_GIVEREF(__pyx_n_u_PyZipFile); PyList_SET_ITEM(__pyx_t_7, 10, __pyx_n_u_PyZipFile); __Pyx_INCREF(__pyx_n_u_LargeZipFile); __Pyx_GIVEREF(__pyx_n_u_LargeZipFile); PyList_SET_ITEM(__pyx_t_7, 11, __pyx_n_u_LargeZipFile); __Pyx_INCREF(__pyx_n_u_Path); __Pyx_GIVEREF(__pyx_n_u_Path); PyList_SET_ITEM(__pyx_t_7, 12, __pyx_n_u_Path); if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_7) < 0) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_BadZipFile, __pyx_n_s_BadZipFile, (PyObject *) NULL, __pyx_n_s_turbozipfile, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_BadZipFile, __pyx_t_7, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BadZipFile, __pyx_t_9) < 0) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_LargeZipFile, __pyx_n_s_LargeZipFile, (PyObject *) NULL, __pyx_n_s_turbozipfile, __pyx_kp_s_Raised_when_writing_a_zipfile_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_LargeZipFile, __pyx_t_7, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_LargeZipFile, __pyx_t_9) < 0) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_BadZipFile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_error, __pyx_t_7) < 0) __PYX_ERR(0, 51, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_BadZipfile, __pyx_t_7) < 0) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZIP64_LIMIT, __pyx_int_2147483647) < 0) __PYX_ERR(0, 53, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZIP_FILECOUNT_LIMIT, __pyx_int_65535) < 0) __PYX_ERR(0, 54, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZIP_MAX_COMMENT, __pyx_int_65535) < 0) __PYX_ERR(0, 55, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZIP_STORED, __pyx_int_0) < 0) __PYX_ERR(0, 58, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZIP_DEFLATED, __pyx_int_8) < 0) __PYX_ERR(0, 59, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZIP_BZIP2, __pyx_int_12) < 0) __PYX_ERR(0, 60, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZIP_LZMA, __pyx_int_14) < 0) __PYX_ERR(0, 61, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_VERSION, __pyx_int_20) < 0) __PYX_ERR(0, 64, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZIP64_VERSION, __pyx_int_45) < 0) __PYX_ERR(0, 65, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_BZIP2_VERSION, __pyx_int_46) < 0) __PYX_ERR(0, 66, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_LZMA_VERSION, __pyx_int_63) < 0) __PYX_ERR(0, 67, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_EXTRACT_VERSION, __pyx_int_63) < 0) __PYX_ERR(0, 69, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_structEndArchive, __pyx_kp_b_4s4H2LH) < 0) __PYX_ERR(0, 79, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringEndArchive, __pyx_kp_b_PK) < 0) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_struct); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_calcsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_structEndArchive); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_sizeEndCentDir, __pyx_t_5) < 0) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECD_SIGNATURE, __pyx_int_0) < 0) __PYX_ERR(0, 83, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECD_DISK_NUMBER, __pyx_int_1) < 0) __PYX_ERR(0, 84, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECD_DISK_START, __pyx_int_2) < 0) __PYX_ERR(0, 85, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECD_ENTRIES_THIS_DISK, __pyx_int_3) < 0) __PYX_ERR(0, 86, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECD_ENTRIES_TOTAL, __pyx_int_4) < 0) __PYX_ERR(0, 87, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECD_SIZE, __pyx_int_5) < 0) __PYX_ERR(0, 88, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECD_OFFSET, __pyx_int_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECD_COMMENT_SIZE, __pyx_int_7) < 0) __PYX_ERR(0, 90, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECD_COMMENT, __pyx_int_8) < 0) __PYX_ERR(0, 93, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECD_LOCATION, __pyx_int_9) < 0) __PYX_ERR(0, 94, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_structCentralDir, __pyx_kp_u_4s4B4HL2L5H2L) < 0) __PYX_ERR(0, 98, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringCentralDir, __pyx_kp_b_PK_2) < 0) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_struct); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_calcsize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_structCentralDir); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_sizeCentralDir, __pyx_t_1) < 0) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_SIGNATURE, __pyx_int_0) < 0) __PYX_ERR(0, 103, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_CREATE_VERSION, __pyx_int_1) < 0) __PYX_ERR(0, 104, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_CREATE_SYSTEM, __pyx_int_2) < 0) __PYX_ERR(0, 105, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_EXTRACT_VERSION, __pyx_int_3) < 0) __PYX_ERR(0, 106, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_EXTRACT_SYSTEM, __pyx_int_4) < 0) __PYX_ERR(0, 107, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_FLAG_BITS, __pyx_int_5) < 0) __PYX_ERR(0, 108, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_COMPRESS_TYPE, __pyx_int_6) < 0) __PYX_ERR(0, 109, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_TIME, __pyx_int_7) < 0) __PYX_ERR(0, 110, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_DATE, __pyx_int_8) < 0) __PYX_ERR(0, 111, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_CRC, __pyx_int_9) < 0) __PYX_ERR(0, 112, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_COMPRESSED_SIZE, __pyx_int_10) < 0) __PYX_ERR(0, 113, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_UNCOMPRESSED_SIZE, __pyx_int_11) < 0) __PYX_ERR(0, 114, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_FILENAME_LENGTH, __pyx_int_12) < 0) __PYX_ERR(0, 115, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_EXTRA_FIELD_LENGTH, __pyx_int_13) < 0) __PYX_ERR(0, 116, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_COMMENT_LENGTH, __pyx_int_14) < 0) __PYX_ERR(0, 117, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_DISK_NUMBER_START, __pyx_int_15) < 0) __PYX_ERR(0, 118, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_INTERNAL_FILE_ATTRIBUTES, __pyx_int_16) < 0) __PYX_ERR(0, 119, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_EXTERNAL_FILE_ATTRIBUTES, __pyx_int_17) < 0) __PYX_ERR(0, 120, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD_LOCAL_HEADER_OFFSET, __pyx_int_18) < 0) __PYX_ERR(0, 121, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_structFileHeader, __pyx_kp_u_4s2B4HL2L2H) < 0) __PYX_ERR(0, 125, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringFileHeader, __pyx_kp_b_PK_3) < 0) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_calcsize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_structFileHeader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_sizeFileHeader, __pyx_t_7) < 0) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_SIGNATURE, __pyx_int_0) < 0) __PYX_ERR(0, 129, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_EXTRACT_VERSION, __pyx_int_1) < 0) __PYX_ERR(0, 130, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_EXTRACT_SYSTEM, __pyx_int_2) < 0) __PYX_ERR(0, 131, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_GENERAL_PURPOSE_FLAG_BITS, __pyx_int_3) < 0) __PYX_ERR(0, 132, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_COMPRESSION_METHOD, __pyx_int_4) < 0) __PYX_ERR(0, 133, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_LAST_MOD_TIME, __pyx_int_5) < 0) __PYX_ERR(0, 134, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_LAST_MOD_DATE, __pyx_int_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_CRC, __pyx_int_7) < 0) __PYX_ERR(0, 136, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_COMPRESSED_SIZE, __pyx_int_8) < 0) __PYX_ERR(0, 137, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_UNCOMPRESSED_SIZE, __pyx_int_9) < 0) __PYX_ERR(0, 138, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_FILENAME_LENGTH, __pyx_int_10) < 0) __PYX_ERR(0, 139, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_FH_EXTRA_FIELD_LENGTH, __pyx_int_11) < 0) __PYX_ERR(0, 140, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_structEndArchive64Locator, __pyx_kp_u_4sLQL) < 0) __PYX_ERR(0, 143, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringEndArchive64Locator, __pyx_kp_b_PK_4) < 0) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_struct); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_calcsize); 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_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_structEndArchive64Locator); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_sizeEndCentDir64Locator, __pyx_t_5) < 0) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_structEndArchive64, __pyx_kp_u_4sQ2H2L4Q) < 0) __PYX_ERR(0, 149, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringEndArchive64, __pyx_kp_b_PK_5) < 0) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_struct); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_calcsize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_structEndArchive64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_sizeEndCentDir64, __pyx_t_1) < 0) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD64_SIGNATURE, __pyx_int_0) < 0) __PYX_ERR(0, 153, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD64_DIRECTORY_RECSIZE, __pyx_int_1) < 0) __PYX_ERR(0, 154, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD64_CREATE_VERSION, __pyx_int_2) < 0) __PYX_ERR(0, 155, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD64_EXTRACT_VERSION, __pyx_int_3) < 0) __PYX_ERR(0, 156, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD64_DISK_NUMBER, __pyx_int_4) < 0) __PYX_ERR(0, 157, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD64_DISK_NUMBER_START, __pyx_int_5) < 0) __PYX_ERR(0, 158, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD64_NUMBER_ENTRIES_THIS_DISK, __pyx_int_6) < 0) __PYX_ERR(0, 159, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD64_NUMBER_ENTRIES_TOTAL, __pyx_int_7) < 0) __PYX_ERR(0, 160, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD64_DIRECTORY_SIZE, __pyx_int_8) < 0) __PYX_ERR(0, 161, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_CD64_OFFSET_START_CENTDIR, __pyx_int_9) < 0) __PYX_ERR(0, 162, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_DD_SIGNATURE, __pyx_int_134695760) < 0) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Struct); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXTRA_FIELD_STRUCT, __pyx_t_1) < 0) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_1_strip_extra, 0, __pyx_n_s_strip_extra, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_strip_extra, __pyx_t_1) < 0) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_3_check_zipfile, 0, __pyx_n_s_check_zipfile, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_zipfile, __pyx_t_1) < 0) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_5is_zipfile, 0, __pyx_n_s_is_zipfile, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_zipfile, __pyx_t_1) < 0) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7_EndRecData64, 0, __pyx_n_s_EndRecData64, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EndRecData64, __pyx_t_1) < 0) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_9_EndRecData, 0, __pyx_n_s_EndRecData, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_EndRecData, __pyx_t_1) < 0) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__65); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__65, __pyx_n_s_ZipInfo, __pyx_n_s_ZipInfo, (PyObject *) NULL, __pyx_n_s_turbozipfile, __pyx_kp_s_Class_with_attributes_describing); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_slots, __pyx_tuple__66) < 0) __PYX_ERR(0, 321, __pyx_L1_error) __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipInfo_1__init__, 0, __pyx_n_s_ZipInfo___init, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__69); if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_init_2, __pyx_t_7) < 0) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipInfo_3__repr__, 0, __pyx_n_s_ZipInfo___repr, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipInfo_5_decodeExtra, 0, __pyx_n_s_ZipInfo__decodeExtra, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_decodeExtra, __pyx_t_7) < 0) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipInfo_7is_dir, 0, __pyx_n_s_ZipInfo_is_dir, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_is_dir, __pyx_t_7) < 0) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ZipInfo, __pyx_tuple__65, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZipInfo, __pyx_t_7) < 0) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_crctable, Py_None) < 0) __PYX_ERR(0, 442, __pyx_L1_error) __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_11_gen_crc, 0, __pyx_n_s_gen_crc, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_gen_crc, __pyx_t_1) < 0) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_13_ZipDecrypter, 0, __pyx_n_s_ZipDecrypter, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZipDecrypter, __pyx_t_1) < 0) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LZMACompressor, __pyx_n_s_LZMACompressor, (PyObject *) NULL, __pyx_n_s_turbozipfile, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_14LZMACompressor_1__init__, 0, __pyx_n_s_LZMACompressor___init, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_2, __pyx_t_5) < 0) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_14LZMACompressor_3_init, 0, __pyx_n_s_LZMACompressor__init, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_14LZMACompressor_5compress, 0, __pyx_n_s_LZMACompressor_compress, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_compress, __pyx_t_5) < 0) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_14LZMACompressor_7flush, 0, __pyx_n_s_LZMACompressor_flush, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_flush, __pyx_t_5) < 0) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LZMACompressor, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_LZMACompressor, __pyx_t_5) < 0) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LZMADecompressor, __pyx_n_s_LZMADecompressor, (PyObject *) NULL, __pyx_n_s_turbozipfile, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_16LZMADecompressor_1__init__, 0, __pyx_n_s_LZMADecompressor___init, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_2, __pyx_t_5) < 0) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_16LZMADecompressor_3decompress, 0, __pyx_n_s_LZMADecompressor_decompress, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_decompress, __pyx_t_5) < 0) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LZMADecompressor, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_LZMADecompressor, __pyx_t_5) < 0) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_int_0, __pyx_n_u_store) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_1, __pyx_n_u_shrink) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_2, __pyx_n_u_reduce) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_3, __pyx_n_u_reduce) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_4, __pyx_n_u_reduce) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_5, __pyx_n_u_reduce) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_6, __pyx_n_u_implode) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_7, __pyx_n_u_tokenize) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_8, __pyx_n_u_deflate) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_9, __pyx_n_u_deflate64) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_10, __pyx_n_u_implode) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_12, __pyx_n_u_bzip2) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_14, __pyx_n_u_lzma) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_18, __pyx_n_u_terse) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_19, __pyx_n_u_lz77) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_97, __pyx_n_u_wavpack) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_int_98, __pyx_n_u_ppmd) < 0) __PYX_ERR(0, 555, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_compressor_names, __pyx_t_1) < 0) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_15_check_compression, 0, __pyx_n_s_check_compression, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_compression, __pyx_t_1) < 0) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_17_get_compressor, 0, __pyx_n_s_get_compressor, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__96); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_compressor, __pyx_t_1) < 0) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_19_get_decompressor, 0, __pyx_n_s_get_decompressor, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_decompressor, __pyx_t_1) < 0) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_SharedFile, __pyx_n_s_SharedFile, (PyObject *) NULL, __pyx_n_s_turbozipfile, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_11_SharedFile_1__init__, 0, __pyx_n_s_SharedFile___init, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_2, __pyx_t_5) < 0) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_11_SharedFile_3seek, 0, __pyx_n_s_SharedFile_seek, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__103); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_seek, __pyx_t_5) < 0) __PYX_ERR(0, 636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_11_SharedFile_5read, 0, __pyx_n_s_SharedFile_read, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__106); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_read, __pyx_t_5) < 0) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_11_SharedFile_7close, 0, __pyx_n_s_SharedFile_close, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_close, __pyx_t_5) < 0) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_SharedFile, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SharedFile, __pyx_t_5) < 0) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Tellable, __pyx_n_s_Tellable, (PyObject *) NULL, __pyx_n_s_turbozipfile, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_9_Tellable_1__init__, 0, __pyx_n_s_Tellable___init, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_2, __pyx_t_5) < 0) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_9_Tellable_3write, 0, __pyx_n_s_Tellable_write, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_write, __pyx_t_5) < 0) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_9_Tellable_5tell, 0, __pyx_n_s_Tellable_tell, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_tell, __pyx_t_5) < 0) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_9_Tellable_7flush, 0, __pyx_n_s_Tellable_flush, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_flush, __pyx_t_5) < 0) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_9_Tellable_9close, 0, __pyx_n_s_Tellable_close, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_close, __pyx_t_5) < 0) __PYX_ERR(0, 674, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Tellable, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Tellable, __pyx_t_5) < 0) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_io); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BufferedIOBase); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_ZipExtFile, __pyx_n_s_ZipExtFile, (PyObject *) NULL, __pyx_n_s_turbozipfile, __pyx_kp_s_File_like_object_for_reading_an); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_MAX_N, __pyx_int_1073741824) < 0) __PYX_ERR(0, 685, __pyx_L1_error) if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_MIN_READ_SIZE, __pyx_int_4096) < 0) __PYX_ERR(0, 688, __pyx_L1_error) if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_MAX_SEEK_READ, __pyx_int_16777216) < 0) __PYX_ERR(0, 691, __pyx_L1_error) __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_1__init__, 0, __pyx_n_s_ZipExtFile___init, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__121); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init_2, __pyx_t_8) < 0) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_3_init_decrypter, 0, __pyx_n_s_ZipExtFile__init_decrypter, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init_decrypter, __pyx_t_8) < 0) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_5__repr__, 0, __pyx_n_s_ZipExtFile___repr, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_repr, __pyx_t_8) < 0) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_7readline, 0, __pyx_n_s_ZipExtFile_readline, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__128); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_readline, __pyx_t_8) < 0) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_9peek, 0, __pyx_n_s_ZipExtFile_peek, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__131); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_peek, __pyx_t_8) < 0) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_11readable, 0, __pyx_n_s_ZipExtFile_readable, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_readable, __pyx_t_8) < 0) __PYX_ERR(0, 796, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_13read, 0, __pyx_n_s_ZipExtFile_read, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__136); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_read, __pyx_t_8) < 0) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_15_update_crc, 0, __pyx_n_s_ZipExtFile__update_crc, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_update_crc, __pyx_t_8) < 0) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_17read1, 0, __pyx_n_s_ZipExtFile_read1, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_read1_2, __pyx_t_8) < 0) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_19_read1, 0, __pyx_n_s_ZipExtFile__read1, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_read1, __pyx_t_8) < 0) __PYX_ERR(0, 885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_21_read2, 0, __pyx_n_s_ZipExtFile__read2, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_read2, __pyx_t_8) < 0) __PYX_ERR(0, 921, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_23close, 0, __pyx_n_s_ZipExtFile_close, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_8); PyList_Append(__pyx_t_9, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_close, __pyx_t_8) < 0) __PYX_ERR(0, 937, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_25seekable, 0, __pyx_n_s_ZipExtFile_seekable, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seekable, __pyx_t_8) < 0) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_27seek, 0, __pyx_n_s_ZipExtFile_seek, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__151); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_8) < 0) __PYX_ERR(0, 949, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10ZipExtFile_29tell, 0, __pyx_n_s_ZipExtFile_tell, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tell, __pyx_t_8) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_ZipExtFile, __pyx_t_1, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_CyFunction_InitClassCell(__pyx_t_9, __pyx_t_8) < 0) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZipExtFile, __pyx_t_8) < 0) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_ZipFile, __pyx_n_s_ZipFile, (PyObject *) NULL, __pyx_n_s_turbozipfile, __pyx_kp_s_Class_with_methods_to_open_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_fp, Py_None) < 0) __PYX_ERR(0, 1031, __pyx_L1_error) if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_windows_illegal_name_trans_tabl, Py_None) < 0) __PYX_ERR(0, 1032, __pyx_L1_error) __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_1__init__, 0, __pyx_n_s_ZipFile___init, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ZIP_STORED); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_5)->__pyx_arg_compression = __pyx_t_7; __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_12turbozipfile_29__defaults__); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_2, __pyx_t_5) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_3__enter__, 0, __pyx_n_s_ZipFile___enter, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_enter, __pyx_t_5) < 0) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_5__exit__, 0, __pyx_n_s_ZipFile___exit, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_exit, __pyx_t_5) < 0) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_7__repr__, 0, __pyx_n_s_ZipFile___repr, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_repr, __pyx_t_5) < 0) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_9_RealGetContents, 0, __pyx_n_s_ZipFile__RealGetContents, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_RealGetContents, __pyx_t_5) < 0) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_11namelist, 0, __pyx_n_s_ZipFile_namelist, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_namelist, __pyx_t_5) < 0) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_13infolist, 0, __pyx_n_s_ZipFile_infolist, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_infolist, __pyx_t_5) < 0) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_15printdir, 0, __pyx_n_s_ZipFile_printdir, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__170); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_printdir, __pyx_t_5) < 0) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_17testzip, 0, __pyx_n_s_ZipFile_testzip, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_testzip, __pyx_t_5) < 0) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_19getinfo, 0, __pyx_n_s_ZipFile_getinfo, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_getinfo, __pyx_t_5) < 0) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_21setpassword, 0, __pyx_n_s_ZipFile_setpassword, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_setpassword, __pyx_t_5) < 0) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_23comment, 0, __pyx_n_s_ZipFile_comment, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_comment, __pyx_t_7) < 0) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_comment); if (unlikely(!__pyx_t_5)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_comment); } if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_25comment, 0, __pyx_n_s_ZipFile_comment, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __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_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __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_7)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_comment, __pyx_t_7) < 0) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_27read, 0, __pyx_n_s_ZipFile_read, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__183); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_read, __pyx_t_7) < 0) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_force_zip64, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1280, __pyx_L1_error) __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_29open, 0, __pyx_n_s_ZipFile_open, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__186); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_8, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_open, __pyx_t_8) < 0) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_31extract, 0, __pyx_n_s_ZipFile_extract, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__189); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_extract_2, __pyx_t_8) < 0) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_33extractall, 0, __pyx_n_s_ZipFile_extractall, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__192); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_extractall, __pyx_t_8) < 0) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_35_extract_member, 0, __pyx_n_s_ZipFile__extract_member, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_extract_member, __pyx_t_8) < 0) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_37__del__, 0, __pyx_n_s_ZipFile___del, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_del, __pyx_t_8) < 0) __PYX_ERR(0, 1433, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_39close, 0, __pyx_n_s_ZipFile_close, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_close, __pyx_t_8) < 0) __PYX_ERR(0, 1437, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_7ZipFile_41_fpclose, 0, __pyx_n_s_ZipFile__fpclose, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_fpclose, __pyx_t_8) < 0) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_ZipFile, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZipFile, __pyx_t_8) < 0) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_21_parents, 0, __pyx_n_s_parents, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_parents, __pyx_t_1) < 0) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_23_ancestry, 0, __pyx_n_s_ancestry, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ancestry, __pyx_t_1) < 0) __PYX_ERR(0, 1473, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyDict_Type)), __pyx_n_s_fromkeys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_dedupe, __pyx_t_1) < 0) __PYX_ERR(0, 1494, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_26_difference, 0, __pyx_n_s_difference, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_difference, __pyx_t_1) < 0) __PYX_ERR(0, 1498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ZipFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_8, __pyx_n_s_CompleteDirs, __pyx_n_s_CompleteDirs, (PyObject *) NULL, __pyx_n_s_turbozipfile, __pyx_kp_s_A_ZipFile_subclass_that_ensures); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_12CompleteDirs_1_implied_dirs, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_CompleteDirs__implied_dirs, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_implied_dirs, __pyx_t_9) < 0) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_12CompleteDirs_3namelist, 0, __pyx_n_s_CompleteDirs_namelist, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_namelist, __pyx_t_9) < 0) __PYX_ERR(0, 1518, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_12CompleteDirs_5_name_set, 0, __pyx_n_s_CompleteDirs__name_set, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_name_set, __pyx_t_9) < 0) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_12CompleteDirs_7resolve_dir, 0, __pyx_n_s_CompleteDirs_resolve_dir, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_resolve_dir, __pyx_t_9) < 0) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_12CompleteDirs_9make, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_CompleteDirs_make, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_make, __pyx_t_5) < 0) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CompleteDirs, __pyx_t_8, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_CompleteDirs, __pyx_t_5) < 0) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CompleteDirs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1555, __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; __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_1, __pyx_n_s_FastLookup, __pyx_n_s_FastLookup, (PyObject *) NULL, __pyx_n_s_turbozipfile, __pyx_kp_s_ZipFile_subclass_to_ensure_impl); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10FastLookup_1namelist, 0, __pyx_n_s_FastLookup_namelist, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_namelist, __pyx_t_5) < 0) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_10FastLookup_3_name_set, 0, __pyx_n_s_FastLookup__name_set, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_name_set, __pyx_t_5) < 0) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_n_s_FastLookup, __pyx_t_1, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_FastLookup, __pyx_t_5) < 0) __PYX_ERR(0, 1555, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Path, __pyx_n_s_Path, (PyObject *) NULL, __pyx_n_s_turbozipfile, __pyx_kp_s_A_pathlib_compatible_interface); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_Path__repr, __pyx_kp_u_self___class_____name___self_ro) < 0) __PYX_ERR(0, 1621, __pyx_L1_error) __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_1__init__, 0, __pyx_n_s_Path___init, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__222); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_2, __pyx_t_8) < 0) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_3open, 0, __pyx_n_s_Path_open, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__225); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_open, __pyx_t_8) < 0) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_5name, 0, __pyx_n_s_Path_name, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_name_2, __pyx_t_7) < 0) __PYX_ERR(0, 1643, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_7read_text, 0, __pyx_n_s_Path_read_text, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_read_text, __pyx_t_7) < 0) __PYX_ERR(0, 1646, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_9read_bytes, 0, __pyx_n_s_Path_read_bytes, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_read_bytes, __pyx_t_7) < 0) __PYX_ERR(0, 1650, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_11_is_child, 0, __pyx_n_s_Path__is_child, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_is_child, __pyx_t_7) < 0) __PYX_ERR(0, 1654, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_13_next, 0, __pyx_n_s_Path__next, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_next, __pyx_t_7) < 0) __PYX_ERR(0, 1657, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_15is_dir, 0, __pyx_n_s_Path_is_dir, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_is_dir, __pyx_t_7) < 0) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_17is_file, 0, __pyx_n_s_Path_is_file, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_is_file, __pyx_t_7) < 0) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_19exists, 0, __pyx_n_s_Path_exists, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_exists, __pyx_t_7) < 0) __PYX_ERR(0, 1666, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_21iterdir, 0, __pyx_n_s_Path_iterdir, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_iterdir, __pyx_t_7) < 0) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_23__str__, 0, __pyx_n_s_Path___str, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_str, __pyx_t_7) < 0) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_25__repr__, 0, __pyx_n_s_Path___repr, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 1678, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_27joinpath, 0, __pyx_n_s_Path_joinpath, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_joinpath, __pyx_t_7) < 0) __PYX_ERR(0, 1681, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_joinpath); if (unlikely(!__pyx_t_7)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_joinpath); } if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_truediv, __pyx_t_7) < 0) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_4Path_29parent, 0, __pyx_n_s_Path_parent, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_parent, __pyx_t_8) < 0) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Path, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Path, __pyx_t_8) < 0) __PYX_ERR(0, 1574, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_12turbozipfile_28main, 0, __pyx_n_s_main_2, NULL, __pyx_n_s_turbozipfile, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__254); if (PyDict_SetItem(__pyx_d, __pyx_n_s_main_2, __pyx_t_1) < 0) __PYX_ERR(0, 1695, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_main, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1731, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_main_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_8, __pyx_kp_u_parents_line_1455, __pyx_kp_u_Given_a_path_with_elements_sepa) < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_8, __pyx_kp_u_ancestry_line_1473, __pyx_kp_u_Given_a_path_with_elements_sepa_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_3, __pyx_t_8) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init turbozipfile", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init turbozipfile"); } __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 } #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 #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 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; } 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); } 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 } 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_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 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(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 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(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; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif #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); } #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #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 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } #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); 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 #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); 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, Py_ssize_t 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)) { 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, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif #endif #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 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; } #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 #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 (__Pyx_PyFastCFunction_Check(func)) { 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 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); } 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"); } 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 } 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; } #if !CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL); } #endif #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 #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 #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; i<n; i++) { if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1; } #endif for (i=0; i<n; i++) { if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1; } return 0; } static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) { PyObject *exc_type = tstate->curexc_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 #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 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); } 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; } } #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 #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; } 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)); } #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 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 } 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; } 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); } 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; } #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #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 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)); } #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 #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #endif 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 } 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; } 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 } #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_RshiftObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); return PyInt_FromLong(a >> b); } #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_rshift(op1, op2); } } x = a >> b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla >> llb; return PyLong_FromLongLong(llx); #endif } #endif return (inplace ? PyNumber_InPlaceRshift : PyNumber_Rshift)(op1, op2); } #endif #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); return PyInt_FromLong(a & b); } #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_and(op1, op2); } } x = a & b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla & llb; return PyLong_FromLongLong(llx); #endif } #endif return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2); } #endif #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 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)); } #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<n; i++) { if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1; } #endif for (i=0; i<n; i++) { PyObject *t = PyTuple_GET_ITEM(tuple, i); #if PY_MAJOR_VERSION < 3 if (likely(exc_type == t)) return 1; #endif if (likely(PyExceptionClass_Check(t))) { if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1; } else { } } return 0; } static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) { if (likely(err == exc_type)) return 1; if (likely(PyExceptionClass_Check(err))) { if (likely(PyExceptionClass_Check(exc_type))) { return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type); } else if (likely(PyTuple_Check(exc_type))) { return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type); } else { } } return PyErr_GivenExceptionMatches(err, exc_type); } static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) { assert(PyExceptionClass_Check(exc_type1)); assert(PyExceptionClass_Check(exc_type2)); if (likely(err == exc_type1 || err == exc_type2)) return 1; if (likely(PyExceptionClass_Check(err))) { return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2); } return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2)); } #endif static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_OrObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); return PyInt_FromLong(a | b); } #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_or(op1, op2); } } x = a | b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla | llb; return PyLong_FromLongLong(llx); #endif } #endif return (inplace ? PyNumber_InPlaceOr : PyNumber_Or)(op1, op2); } #endif #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_XorObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); return PyInt_FromLong(a ^ b); } #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_xor(op1, op2); } } x = a ^ b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla ^ llb; return PyLong_FromLongLong(llx); #endif } #endif return (inplace ? PyNumber_InPlaceXor : PyNumber_Xor)(op1, op2); } #endif static CYTHON_INLINE int __Pyx_PyByteArray_Append(PyObject* bytearray, int value) { PyObject *pyval, *retval; #if CYTHON_COMPILING_IN_CPYTHON if (likely(__Pyx_is_valid_index(value, 256))) { Py_ssize_t n = Py_SIZE(bytearray); if (likely(n != PY_SSIZE_T_MAX)) { if (unlikely(PyByteArray_Resize(bytearray, n + 1) < 0)) return -1; PyByteArray_AS_STRING(bytearray)[n] = value; return 0; } } else { PyErr_SetString(PyExc_ValueError, "byte must be in range(0, 256)"); return -1; } #endif pyval = PyInt_FromLong(value); if (unlikely(!pyval)) return -1; retval = __Pyx_PyObject_CallMethod1(bytearray, __pyx_n_s_append, pyval); Py_DECREF(pyval); if (unlikely(!retval)) return -1; Py_DECREF(retval); return 0; } static CYTHON_INLINE int __Pyx_PyByteArray_AppendObject(PyObject* bytearray, PyObject* value) { Py_ssize_t ival; #if PY_MAJOR_VERSION < 3 if (unlikely(PyString_Check(value))) { if (unlikely(PyString_GET_SIZE(value) != 1)) { PyErr_SetString(PyExc_ValueError, "string must be of size 1"); return -1; } ival = (unsigned char) (PyString_AS_STRING(value)[0]); } else #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(value)) && likely(Py_SIZE(value) == 1 || Py_SIZE(value) == 0)) { if (Py_SIZE(value) == 0) { ival = 0; } else { ival = ((PyLongObject*)value)->ob_digit[0]; if (unlikely(ival > 255)) goto bad_range; } } else #endif { ival = __Pyx_PyIndex_AsSsize_t(value); if (unlikely(!__Pyx_is_valid_index(ival, 256))) { if (ival == -1 && PyErr_Occurred()) return -1; goto bad_range; } } return __Pyx_PyByteArray_Append(bytearray, ival); bad_range: PyErr_SetString(PyExc_ValueError, "byte must be in range(0, 256)"); return -1; } 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; } #include <structmember.h> 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_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { if (unlikely(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_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; 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) { #if PY_MAJOR_VERSION < 3 __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; #endif return __Pyx_PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("<cyfunction %U at %p>", op->func_qualname, (void *)op); #else return PyString_FromFormat("<cyfunction %s at %p>", 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 #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 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; m->defaults_size = size; 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); } static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op2))) { const long a = intval; long x; long b = PyInt_AS_LONG(op2); 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(op2))) { const long a = intval; long b, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG lla = intval; PY_LONG_LONG llb, llx; #endif const digit* digits = ((PyLongObject*)op2)->ob_digit; const Py_ssize_t size = Py_SIZE(op2); if (likely(__Pyx_sst_abs(size) <= 1)) { b = likely(size) ? digits[0] : 0; if (size == -1) b = -b; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { b = -(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) { llb = -(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) { b = (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) { llb = (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) { b = -(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) { llb = -(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) { b = (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) { llb = (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) { b = -(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) { llb = -(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) { b = (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) { llb = (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(op2)) { const long a = intval; double b = PyFloat_AS_DOUBLE(op2); 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 #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 #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 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); } #if !CYTHON_COMPILING_IN_PYPY #if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS #define __Pyx_PyInt_TrueDivideObjC_ZeroDivisionError(operand)\ if (unlikely(zerodivision_check && ((operand) == 0))) {\ PyErr_SetString(PyExc_ZeroDivisionError, "integer division by zero");\ return NULL;\ } #endif static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); __Pyx_PyInt_TrueDivideObjC_ZeroDivisionError(b) if (8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53))) { return PyFloat_FromDouble((double)a / (double)b); } return PyInt_Type.tp_as_number->nb_true_divide(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; 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 && 1 * PyLong_SHIFT < 53) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) { 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; } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) { 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; } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_true_divide(op1, op2); } } __Pyx_PyInt_TrueDivideObjC_ZeroDivisionError(b) if ((8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53))) || __Pyx_sst_abs(size) <= 52 / PyLong_SHIFT) { return PyFloat_FromDouble((double)a / (double)b); } return PyLong_Type.tp_as_number->nb_true_divide(op1, op2); return PyLong_FromLong(x); } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; if (unlikely(zerodivision_check && b == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); return NULL; } PyFPE_START_PROTECT("divide", return NULL) result = ((double)a) / (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2); } #endif 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 ((1) && (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; } 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; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { if (likely(cfunc->func)) { PyObject *args[2] = {arg1, arg2}; if (cfunc->flag == METH_FASTCALL) { #if PY_VERSION_HEX >= 0x030700A0 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); #else return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } #if PY_VERSION_HEX >= 0x030700A0 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); } #endif static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ PyObject *args, *result = NULL; if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON if (cfunc->func && (cfunc->flag & METH_VARARGS)) { args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); if (cfunc->flag & METH_KEYWORDS) result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { args = PyTuple_New(3); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg1); PyTuple_SET_ITEM(args, 1, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 2, arg2); result = __Pyx_PyObject_Call(cfunc->method, args, NULL); } #else args = PyTuple_Pack(3, self, arg1, arg2); if (unlikely(!args)) goto bad; result = __Pyx_PyObject_Call(cfunc->method, args, NULL); #endif bad: Py_XDECREF(args); return result; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { if (likely(cfunc->func)) { int flag = cfunc->flag; if (flag == METH_O) { return (*(cfunc->func))(self, arg); } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { if (PY_VERSION_HEX >= 0x030700A0) { return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); } else { return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } return __Pyx__CallUnboundCMethod1(cfunc, self, arg); } #endif static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ PyObject *args, *result = NULL; if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON if (cfunc->func && (cfunc->flag & METH_VARARGS)) { args = PyTuple_New(1); if (unlikely(!args)) goto bad; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); if (cfunc->flag & METH_KEYWORDS) result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); result = __Pyx_PyObject_Call(cfunc->method, args, NULL); } #else args = PyTuple_Pack(2, self, arg); if (unlikely(!args)) goto bad; result = __Pyx_PyObject_Call(cfunc->method, args, NULL); #endif bad: Py_XDECREF(args); return result; } static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3 if ((1)) { return _PyDict_Pop(d, key, default_value); } else #endif if (default_value) { return __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_pop, d, key, default_value); } else { return __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_pop, d, key); } } #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 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 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) { Py_ssize_t i, count = PyList_GET_SIZE(cyfunctions); for (i = 0; i < count; i++) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyList_GET_ITEM(cyfunctions, i); #else PySequence_ITEM(cyfunctions, i); if (unlikely(!m)) return -1; #endif Py_INCREF(classobj); m->func_classobj = classobj; #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF((PyObject*)m); #endif } return 0; } static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { return PyClassMethod_New(method); } #else #if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY if (PyMethodDescr_Check(method)) #else #if PY_MAJOR_VERSION == 2 static PyTypeObject *methoddescr_type = NULL; if (methoddescr_type == NULL) { PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append"); if (!meth) return NULL; methoddescr_type = Py_TYPE(meth); Py_DECREF(meth); } #else PyTypeObject *methoddescr_type = &PyMethodDescr_Type; #endif if (__Pyx_TypeCheck(method, methoddescr_type)) #endif { PyMethodDescrObject *descr = (PyMethodDescrObject *)method; #if PY_VERSION_HEX < 0x03020000 PyTypeObject *d_type = descr->d_type; #else PyTypeObject *d_type = descr->d_common.d_type; #endif return PyDescr_NewClassMethod(d_type, descr->d_method); } #endif else if (PyMethod_Check(method)) { return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); } else { return PyClassMethod_New(method); } } #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED 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 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); } #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, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, py_srcfile, py_funcname, py_line, __pyx_empty_bytes ); 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, py_code, __pyx_d, 0 ); 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); } #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;\ } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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); } } static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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; } static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif 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; } #include <structmember.h> #include <frameobject.h> #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (likely(et == PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); value = Py_None; } #if PY_VERSION_HEX >= 0x030300A0 else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) { value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); } #endif else if (unlikely(PyTuple_Check(ev))) { if (PyTuple_GET_SIZE(ev) >= 1) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS value = PyTuple_GET_ITEM(ev, 0); Py_INCREF(value); #else value = PySequence_ITEM(ev, 0); #endif } else { Py_INCREF(Py_None); value = Py_None; } Py_DECREF(ev); } else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { value = ev; } if (likely(value)) { Py_XDECREF(tb); Py_DECREF(et); *pvalue = value; return 0; } } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { __Pyx_ErrRestore(et, ev, tb); return -1; } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if PY_VERSION_HEX >= 0x030300A0 value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); #else { PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args); Py_DECREF(ev); if (likely(args)) { value = PySequence_GetItem(args, 0); Py_DECREF(args); } if (unlikely(!value)) { __Pyx_ErrRestore(NULL, NULL, NULL); Py_INCREF(Py_None); value = Py_None; } } #endif *pvalue = value; return 0; } static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { PyObject *t, *v, *tb; t = exc_state->exc_type; v = exc_state->exc_value; tb = exc_state->exc_traceback; exc_state->exc_type = NULL; exc_state->exc_value = NULL; exc_state->exc_traceback = NULL; Py_XDECREF(t); Py_XDECREF(v); Py_XDECREF(tb); } #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) { const char *msg; if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { msg = "coroutine already executing"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { msg = "async generator already executing"; #endif } else { msg = "generator already executing"; } PyErr_SetString(PyExc_ValueError, msg); } #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) { const char *msg; if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check(gen)) { msg = "can't send non-None value to a just-started coroutine"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact(gen)) { msg = "can't send non-None value to a just-started async generator"; #endif } else { msg = "can't send non-None value to a just-started generator"; } PyErr_SetString(PyExc_TypeError, msg); } #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL) static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) { #ifdef __Pyx_Coroutine_USED if (!closing && __Pyx_Coroutine_Check(gen)) { PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); } else #endif if (value) { #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(gen)) PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration); else #endif PyErr_SetNone(PyExc_StopIteration); } } static PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) { __Pyx_PyThreadState_declare PyThreadState *tstate; __Pyx_ExcInfoStruct *exc_state; PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { if (unlikely(value && value != Py_None)) { return __Pyx_Coroutine_NotStartedError((PyObject*)self); } } if (unlikely(self->resume_label == -1)) { return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); } #if CYTHON_FAST_THREAD_STATE __Pyx_PyThreadState_assign tstate = __pyx_tstate; #else tstate = __Pyx_PyThreadState_Current; #endif exc_state = &self->gi_exc_state; if (exc_state->exc_type) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON #else if (exc_state->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(tstate->frame); assert(f->f_back == NULL); f->f_back = tstate->frame; } #endif } #if CYTHON_USE_EXC_INFO_STACK exc_state->previous_item = tstate->exc_info; tstate->exc_info = exc_state; #else if (exc_state->exc_type) { __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } else { __Pyx_Coroutine_ExceptionClear(exc_state); __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } #endif self->is_running = 1; retval = self->body((PyObject *) self, tstate, value); self->is_running = 0; #if CYTHON_USE_EXC_INFO_STACK exc_state = &self->gi_exc_state; tstate->exc_info = exc_state->previous_item; exc_state->previous_item = NULL; __Pyx_Coroutine_ResetFrameBackpointer(exc_state); #endif return retval; } static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { PyObject *exc_tb = exc_state->exc_traceback; if (likely(exc_tb)) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON #else PyTracebackObject *tb = (PyTracebackObject *) exc_tb; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); #endif } } static CYTHON_INLINE PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) { if (unlikely(!retval)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (!__Pyx_PyErr_Occurred()) { PyObject *exc = PyExc_StopIteration; #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(gen)) exc = __Pyx_PyExc_StopAsyncIteration; #endif __Pyx_PyErr_SetNone(exc); } } return retval; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) static CYTHON_INLINE PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { #if PY_VERSION_HEX <= 0x030A00A1 return _PyGen_Send(gen, arg); #else PyObject *result; if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { if (PyAsyncGen_CheckExact(gen)) { assert(result == Py_None); PyErr_SetNone(PyExc_StopAsyncIteration); } else if (result == Py_None) { PyErr_SetNone(PyExc_StopIteration); } else { _PyGen_SetStopIterationValue(result); } Py_CLEAR(result); } return result; #endif } #endif static CYTHON_INLINE PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { PyObject *ret; PyObject *val = NULL; __Pyx_Coroutine_Undelegate(gen); __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); ret = __Pyx_Coroutine_SendEx(gen, val, 0); Py_XDECREF(val); return ret; } static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { PyObject *retval; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_PyAsyncGenASend_CheckExact(yf)) { ret = __Pyx_async_gen_asend_send(yf, value); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyGen_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyCoro_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); } else #endif { if (value == Py_None) ret = Py_TYPE(yf)->tp_iternext(yf); else ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); } gen->is_running = 0; if (likely(ret)) { return ret; } retval = __Pyx_Coroutine_FinishDelegation(gen); } else { retval = __Pyx_Coroutine_SendEx(gen, value, 0); } return __Pyx_Coroutine_MethodReturn(self, retval); } static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { PyObject *retval = NULL; int err = 0; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL); if (!retval) return -1; } else #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_PyAsyncGenASend_CheckExact(yf)) { retval = __Pyx_async_gen_asend_close(yf, NULL); } else if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { retval = __Pyx_async_gen_athrow_close(yf, NULL); } else #endif { PyObject *meth; gen->is_running = 1; meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); } PyErr_Clear(); } else { retval = PyObject_CallFunction(meth, NULL); Py_DECREF(meth); if (!retval) err = -1; } gen->is_running = 0; } Py_XDECREF(retval); return err; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Next(yf); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyGen_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { ret = __Pyx_Coroutine_Send(yf, Py_None); } else #endif ret = Py_TYPE(yf)->tp_iternext(yf); gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_SendEx(gen, Py_None, 0); } static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) { return __Pyx_Coroutine_Close(self); } static PyObject *__Pyx_Coroutine_Close(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *retval, *raised_exception; PyObject *yf = gen->yieldfrom; int err = 0; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { Py_INCREF(yf); err = __Pyx_Coroutine_CloseIter(gen, yf); __Pyx_Coroutine_Undelegate(gen); Py_DECREF(yf); } if (err == 0) PyErr_SetNone(PyExc_GeneratorExit); retval = __Pyx_Coroutine_SendEx(gen, NULL, 1); if (unlikely(retval)) { const char *msg; Py_DECREF(retval); if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check(self)) { msg = "coroutine ignored GeneratorExit"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact(self)) { #if PY_VERSION_HEX < 0x03060000 msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)"; #else msg = "async generator ignored GeneratorExit"; #endif #endif } else { msg = "generator ignored GeneratorExit"; } PyErr_SetString(PyExc_RuntimeError, msg); return NULL; } raised_exception = PyErr_Occurred(); if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) { if (raised_exception) PyErr_Clear(); Py_INCREF(Py_None); return Py_None; } return NULL; } static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, PyObject *args, int close_on_genexit) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *yf = gen->yieldfrom; if (unlikely(gen->is_running)) return __Pyx_Coroutine_AlreadyRunningError(gen); if (yf) { PyObject *ret; Py_INCREF(yf); if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { int err = __Pyx_Coroutine_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Coroutine_Undelegate(gen); if (err < 0) return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); goto throw_here; } gen->is_running = 1; if (0 #ifdef __Pyx_Generator_USED || __Pyx_Generator_CheckExact(yf) #endif #ifdef __Pyx_Coroutine_USED || __Pyx_Coroutine_Check(yf) #endif ) { ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); #ifdef __Pyx_Coroutine_USED } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); #endif } else { PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { gen->is_running = 0; return NULL; } PyErr_Clear(); __Pyx_Coroutine_Undelegate(gen); gen->is_running = 0; goto throw_here; } if (likely(args)) { ret = PyObject_CallObject(meth, args); } else { ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL); } Py_DECREF(meth); } gen->is_running = 0; Py_DECREF(yf); if (!ret) { ret = __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_MethodReturn(self, ret); } throw_here: __Pyx_Raise(typ, val, tb, NULL); return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); } static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { PyObject *typ; PyObject *val = NULL; PyObject *tb = NULL; if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) return NULL; return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); } static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { Py_VISIT(exc_state->exc_type); Py_VISIT(exc_state->exc_value); Py_VISIT(exc_state->exc_traceback); return 0; } static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); } static int __Pyx_Coroutine_clear(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); } #endif Py_CLEAR(gen->gi_code); Py_CLEAR(gen->gi_name); Py_CLEAR(gen->gi_qualname); Py_CLEAR(gen->gi_modulename); return 0; } static void __Pyx_Coroutine_dealloc(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); if (gen->resume_label >= 0) { PyObject_GC_Track(self); #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE if (PyObject_CallFinalizerFromDealloc(self)) #else Py_TYPE(gen)->tp_del(self); if (self->ob_refcnt > 0) #endif { return; } PyObject_GC_UnTrack(self); } #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); } #endif __Pyx_Coroutine_clear(self); PyObject_GC_Del(gen); } static void __Pyx_Coroutine_del(PyObject *self) { PyObject *error_type, *error_value, *error_traceback; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; __Pyx_PyThreadState_declare if (gen->resume_label < 0) { return; } #if !CYTHON_USE_TP_FINALIZE assert(self->ob_refcnt == 0); __Pyx_SET_REFCNT(self, 1); #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; PyObject *finalizer = agen->ag_finalizer; if (finalizer && !agen->ag_closed) { PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); if (unlikely(!res)) { PyErr_WriteUnraisable(self); } else { Py_DECREF(res); } __Pyx_ErrRestore(error_type, error_value, error_traceback); return; } } #endif if (unlikely(gen->resume_label == 0 && !error_value)) { #ifdef __Pyx_Coroutine_USED #ifdef __Pyx_Generator_USED if (!__Pyx_Generator_CheckExact(self)) #endif { PyObject_GC_UnTrack(self); #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat) if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) PyErr_WriteUnraisable(self); #else {PyObject *msg; char *cmsg; #if CYTHON_COMPILING_IN_PYPY msg = NULL; cmsg = (char*) "coroutine was never awaited"; #else char *cname; PyObject *qualname; qualname = gen->gi_qualname; cname = PyString_AS_STRING(qualname); msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname); if (unlikely(!msg)) { PyErr_Clear(); cmsg = (char*) "coroutine was never awaited"; } else { cmsg = PyString_AS_STRING(msg); } #endif if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0)) PyErr_WriteUnraisable(self); Py_XDECREF(msg);} #endif PyObject_GC_Track(self); } #endif } else { PyObject *res = __Pyx_Coroutine_Close(self); if (unlikely(!res)) { if (PyErr_Occurred()) PyErr_WriteUnraisable(self); } else { Py_DECREF(res); } } __Pyx_ErrRestore(error_type, error_value, error_traceback); #if !CYTHON_USE_TP_FINALIZE assert(self->ob_refcnt > 0); if (--self->ob_refcnt == 0) { return; } { Py_ssize_t refcnt = self->ob_refcnt; _Py_NewReference(self); __Pyx_SET_REFCNT(self, refcnt); } #if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(self->ob_type) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); _Py_DEC_REFTOTAL; #endif #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif #endif } static PyObject * __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) { PyObject *name = self->gi_name; if (unlikely(!name)) name = Py_None; Py_INCREF(name); return name; } static int __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, 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 = self->gi_name; Py_INCREF(value); self->gi_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) { PyObject *name = self->gi_qualname; if (unlikely(!name)) name = Py_None; Py_INCREF(name); return name; } static int __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, 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 = self->gi_qualname; Py_INCREF(value); self->gi_qualname = value; Py_XDECREF(tmp); return 0; } static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); if (unlikely(!gen)) return NULL; return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); } static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; gen->gi_exc_state.exc_type = NULL; gen->gi_exc_state.exc_value = NULL; gen->gi_exc_state.exc_traceback = NULL; #if CYTHON_USE_EXC_INFO_STACK gen->gi_exc_state.previous_item = NULL; #endif gen->gi_weakreflist = NULL; Py_XINCREF(qualname); gen->gi_qualname = qualname; Py_XINCREF(name); gen->gi_name = name; Py_XINCREF(module_name); gen->gi_modulename = module_name; Py_XINCREF(code); gen->gi_code = code; PyObject_GC_Track(gen); return gen; } 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; } #ifndef CYTHON_REGISTER_ABCS #define CYTHON_REGISTER_ABCS 1 #endif #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static PyObject* __Pyx_patch_abc_module(PyObject *module); static PyObject* __Pyx_patch_abc_module(PyObject *module) { module = __Pyx_Coroutine_patch_module( module, "" "if _cython_generator_type is not None:\n" " try: Generator = _module.Generator\n" " except AttributeError: pass\n" " else: Generator.register(_cython_generator_type)\n" "if _cython_coroutine_type is not None:\n" " try: Coroutine = _module.Coroutine\n" " except AttributeError: pass\n" " else: Coroutine.register(_cython_coroutine_type)\n" ); return module; } #endif static int __Pyx_patch_abc(void) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static int abc_patched = 0; if (CYTHON_REGISTER_ABCS && !abc_patched) { PyObject *module; module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections"); if (!module) { PyErr_WriteUnraisable(NULL); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, ((PY_MAJOR_VERSION >= 3) ? "Cython module failed to register with collections.abc module" : "Cython module failed to register with collections module"), 1) < 0)) { return -1; } } else { module = __Pyx_patch_abc_module(module); abc_patched = 1; if (unlikely(!module)) return -1; Py_DECREF(module); } module = PyImport_ImportModule("backports_abc"); if (module) { module = __Pyx_patch_abc_module(module); Py_XDECREF(module); } if (!module) { PyErr_Clear(); } } #else if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL); #endif return 0; } static PyMethodDef __pyx_Generator_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, {0, 0, 0, 0} }; static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, {0, 0, 0, 0, 0} }; static PyGetSetDef __pyx_Generator_getsets[] = { {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, (char*) PyDoc_STR("name of the generator"), 0}, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, (char*) PyDoc_STR("qualified name of the generator"), 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) "generator", sizeof(__pyx_CoroutineObject), 0, (destructor) __Pyx_Coroutine_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, 0, (traverseproc) __Pyx_Coroutine_traverse, 0, 0, offsetof(__pyx_CoroutineObject, gi_weakreflist), 0, (iternextfunc) __Pyx_Generator_Next, __pyx_Generator_methods, __pyx_Generator_memberlist, __pyx_Generator_getsets, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if CYTHON_USE_TP_FINALIZE 0, #else __Pyx_Coroutine_del, #endif 0, #if CYTHON_USE_TP_FINALIZE __Pyx_Coroutine_del, #elif PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #endif }; static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); if (unlikely(!__pyx_GeneratorType)) { return -1; } return 0; } 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; } 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
fc618171cbb3c7195c8387b1c4321474fa0d4985
309f9b2a66a89c2edcc300129359e8a79c37ceee
/fs/minix/dir.c
414ec40fde08ffde153b91cda55be520d9ac6175
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
mikaku/Fiwix
47df5c58aaf9879e2bad6cf6b88d4ed9dfa57392
8a1352db07c843e3c53c3aa7f72f518acdab7d7b
refs/heads/master
2023-09-03T18:38:02.823376
2023-09-01T09:43:56
2023-09-01T09:43:56
129,542,762
195
18
MIT
2023-08-16T10:39:20
2018-04-14T18:15:22
C
UTF-8
C
false
false
3,170
c
dir.c
/* * fiwix/fs/minix/dir.c * * Copyright 2018-2022, Jordi Sanfeliu. All rights reserved. * Distributed under the terms of the Fiwix License. */ #include <fiwix/types.h> #include <fiwix/errno.h> #include <fiwix/buffer.h> #include <fiwix/fs.h> #include <fiwix/filesystems.h> #include <fiwix/stat.h> #include <fiwix/dirent.h> #include <fiwix/mm.h> #include <fiwix/stdio.h> #include <fiwix/string.h> struct fs_operations minix_dir_fsop = { 0, 0, minix_dir_open, minix_dir_close, minix_dir_read, minix_dir_write, NULL, /* ioctl */ NULL, /* llseek */ minix_dir_readdir, NULL, /* mmap */ NULL, /* select */ NULL, /* readlink */ NULL, /* followlink */ minix_bmap, minix_lookup, minix_rmdir, minix_link, minix_unlink, minix_symlink, minix_mkdir, minix_mknod, NULL, /* truncate */ minix_create, minix_rename, NULL, /* read_block */ NULL, /* write_block */ NULL, /* read_inode */ NULL, /* write_inode */ NULL, /* ialloc */ NULL, /* ifree */ NULL, /* statfs */ NULL, /* read_superblock */ NULL, /* remount_fs */ NULL, /* write_superblock */ NULL /* release_superblock */ }; int minix_dir_open(struct inode *i, struct fd *fd_table) { fd_table->offset = 0; return 0; } int minix_dir_close(struct inode *i, struct fd *fd_table) { return 0; } int minix_dir_read(struct inode *i, struct fd *fd_table, char *buffer, __size_t count) { return -EISDIR; } int minix_dir_write(struct inode *i, struct fd *fd_table, const char *buffer, __size_t count) { return -EBADF; } int minix_dir_readdir(struct inode *i, struct fd *fd_table, struct dirent *dirent, __size_t count) { __blk_t block; unsigned int doffset, offset; unsigned int size, dirent_len; struct minix_dir_entry *d; int base_dirent_len; int blksize; struct buffer *buf; if(!(S_ISDIR(i->i_mode))) { return -EBADF; } blksize = i->sb->s_blocksize; if(fd_table->offset > i->i_size) { fd_table->offset = i->i_size; } base_dirent_len = sizeof(dirent->d_ino) + sizeof(dirent->d_off) + sizeof(dirent->d_reclen); offset = size = 0; while(fd_table->offset < i->i_size && count > 0) { if((block = bmap(i, fd_table->offset, FOR_READING)) < 0) { return block; } if(block) { if(!(buf = bread(i->dev, block, blksize))) { return -EIO; } doffset = fd_table->offset; offset = fd_table->offset % blksize; while(offset < blksize) { d = (struct minix_dir_entry *)(buf->data + offset); if(d->inode) { dirent_len = (base_dirent_len + (strlen(d->name) + 1)) + 3; dirent_len &= ~3; /* round up */ dirent->d_ino = d->inode; if((size + dirent_len) < count) { dirent->d_off = doffset; dirent->d_reclen = dirent_len; memcpy_b(dirent->d_name, d->name, strlen(d->name)); dirent->d_name[strlen(d->name)] = 0; dirent = (struct dirent *)((char *)dirent + dirent_len); size += dirent_len; count -= dirent_len; } else { count = 0; break; } } doffset += i->sb->u.minix.dirsize; offset += i->sb->u.minix.dirsize; } brelse(buf); } fd_table->offset &= ~(blksize - 1); fd_table->offset += offset; } return size; }
504312068c473436320ebaae1c8a284910116da5
08c38200a88c921c925c33e18844f42dcb52aa90
/HappyDNS/include/HappyDNS/HappyDNS.h
2cdb144b3d328f8a4a110cfd8b1fd5aa3a3622c3
[ "MIT" ]
permissive
qiniu/happy-dns-objc
f9eb619a227c91fd18256208dc95a8eacb8b3bcf
5913ec8baaaee0f6ccc89590a4dbfe8f0fd50386
refs/heads/master
2023-08-24T17:10:55.180114
2023-08-21T02:26:59
2023-08-21T02:26:59
37,804,383
525
105
MIT
2023-08-21T02:27:00
2015-06-21T10:02:43
Objective-C
UTF-8
C
false
false
16
h
HappyDNS.h
../../HappyDNS.h
d8900480a4d644c9da3dbe2fcc13a40b047a8899
bb38c44037a99d0a12a12d92059678f2faebbc80
/src/include/pgxc/pgxc.h
2659e5b1947e51c6300c37438b84004faca56e57
[ "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference", "PostgreSQL", "BSD-3-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-unicode", "LicenseRef-scancode-warranty-disclaimer", "curl", "GPL-1.0-or-later", "LGPL-2.1-or-later", "LGPL-2.1-only", "CC-BY-4.0", "LicenseRef-scancode-protobuf", "OpenSSL", "LicenseRef-scancode-generic-export-compliance", "X11-distribute-modifications-variant", "LicenseRef-scancode-other-permissive", "MIT", "NCSA", "Python-2.0", "LicenseRef-scancode-openssl", "LicenseRef-scancode-ssleay-windows", "CC-BY-3.0", "LicenseRef-scancode-other-copyleft", "GPL-2.0-only", "BSL-1.0", "Apache-2.0", "LGPL-2.0-only", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "Zlib" ]
permissive
opengauss-mirror/openGauss-server
a9c5a62908643492347830826c56da49f0942796
310e84631c68c8bf37b004148b66f94064f701e4
refs/heads/master
2023-07-26T19:29:12.495484
2023-07-17T12:23:32
2023-07-17T12:23:32
276,117,477
591
208
MulanPSL-2.0
2023-04-28T12:30:18
2020-06-30T14:08:59
C++
UTF-8
C
false
false
2,820
h
pgxc.h
/* ------------------------------------------------------------------------- * * pgxc.h * openGauss flags and connection control information * * * Portions Copyright (c) 1996-2011 PostgreSQL Global Development Group * Portions Copyright (c) 2010-2012 Postgres-XC Development Group * * src/include/pgxc/pgxc.h * * ------------------------------------------------------------------------- */ #ifndef PGXC_H #define PGXC_H #include "storage/lock/lwlock.h" #include "postgres.h" #include "knl/knl_variable.h" extern bool isRestoreMode; // @Temp Table. Normally we only execute "drop schema pg_temp_XXX" on coordinator, // but initdb use some temp tables too, whose we must do dropping in this case, extern bool isSingleMode; extern bool isSecurityMode; typedef enum { REMOTE_CONN_APP, REMOTE_CONN_COORD, REMOTE_CONN_DATANODE, REMOTE_CONN_GTM, REMOTE_CONN_GTM_PROXY, REMOTE_CONN_INTERNAL_TOOL, REMOTE_CONN_GTM_TOOL } RemoteConnTypes; #ifdef ENABLE_MULTIPLE_NODES #define IS_PGXC_COORDINATOR (g_instance.role == VCOORDINATOR && !is_streaming_engine()) #define IS_PGXC_DATANODE (g_instance.role == VDATANODE || g_instance.role == VSINGLENODE || is_streaming_engine()) #else #define IS_PGXC_COORDINATOR false #define IS_PGXC_DATANODE true #endif #define IS_SINGLE_NODE (g_instance.role == VSINGLENODE) #define REMOTE_CONN_TYPE u_sess->attr.attr_common.remoteConnType #define COORDINATOR_NOT_SINGLE (g_instance.role == VDATANODE && g_instance.role != VSINGLENODE) #define IS_SERVICE_NODE (g_instance.role == VCOORDINATOR || g_instance.role == VSINGLENODE) #define IsConnFromApp() (u_sess->attr.attr_common.remoteConnType == REMOTE_CONN_APP) #ifdef ENABLE_MULTIPLE_NODES #define IsConnFromCoord() (u_sess->attr.attr_common.remoteConnType == REMOTE_CONN_COORD) #else #define IsConnFromCoord() false #endif #define IsConnFromDatanode() (u_sess->attr.attr_common.remoteConnType == REMOTE_CONN_DATANODE) #define IsConnFromGtm() (u_sess->attr.attr_common.remoteConnType == REMOTE_CONN_GTM) #define IsConnFromGtmProxy() (u_sess->attr.attr_common.remoteConnType == REMOTE_CONN_GTM_PROXY) #define IsConnFromInternalTool() (u_sess->attr.attr_common.remoteConnType == REMOTE_CONN_INTERNAL_TOOL) #define IsConnFromGTMTool() (u_sess->attr.attr_common.remoteConnType == REMOTE_CONN_GTM_TOOL) /* Is the CN receive SQL statement ? */ #define IS_MAIN_COORDINATOR (IS_PGXC_COORDINATOR && !IsConnFromCoord()) #define ENABLE_THREAD_POOL_DN_LOGICCONN ((g_instance.attr.attr_common.enable_thread_pool && \ g_instance.attr.attr_storage.comm_cn_dn_logic_conn && \ IS_PGXC_DATANODE)) /* key pair to be used as object id while using advisory lock for backup */ #define XC_LOCK_FOR_BACKUP_KEY_1 0xFFFF #define XC_LOCK_FOR_BACKUP_KEY_2 0xFFFF #endif /* PGXC_H */
edb710d6d6d5328301f4db799883d1c7777bccba
89db60818afeb3dc7c3b7abe9ceae155f074f7f2
/src/cmd/tcs/conv_jis.c
862751411d78c90848b34e501cf372cbc92d4eb6
[ "bzip2-1.0.6", "LPL-1.02", "MIT" ]
permissive
9fans/plan9port
63c3d01928c6f8a8617d3ea6ecc05bac72391132
65c090346a38a8c30cb242d345aa71060116340c
refs/heads/master
2023-08-25T17:14:26.233105
2023-08-23T13:21:37
2023-08-23T18:47:08
26,095,474
1,645
468
NOASSERTION
2023-09-05T16:55:41
2014-11-02T22:40:13
C
UTF-8
C
false
false
11,016
c
conv_jis.c
#ifdef PLAN9 #include <u.h> #include <libc.h> #include <bio.h> #else #include <stdio.h> #include <unistd.h> #include "plan9.h" #endif #include "hdr.h" #include "conv.h" #include "kuten208.h" #include "jis.h" /* a state machine for interpreting all sorts of encodings */ static void alljis(int c, Rune **r, long input_loc) { static enum { state0, state1, state2, state3, state4 } state = state0; static int set8 = 0; static int japan646 = 0; static int lastc; int n; long l; again: switch(state) { case state0: /* idle state */ if(c == ESC){ state = state1; return; } if(c < 0) return; if(!set8 && (c < 128)){ if(japan646){ switch(c) { case '\\': emit(0xA5); return; /* yen */ case '~': emit(0xAF); return; /* spacing macron */ default: emit(c); return; } } else { emit(c); return; } } if(c < 0x21){ /* guard against bogus characters in JIS mode */ if(squawk) EPR "%s: non-JIS character %02x in %s near byte %ld\n", argv0, c, file, input_loc); emit(c); return; } lastc = c; state = state4; return; case state1: /* seen an escape */ if(c == '$'){ state = state2; return; } if(c == '('){ state = state3; return; } emit(ESC); state = state0; goto again; case state2: /* may be shifting into JIS */ if((c == '@') || (c == 'B')){ set8 = 1; state = state0; return; } emit(ESC); emit('$'); state = state0; goto again; case state3: /* may be shifting out of JIS */ if((c == 'J') || (c == 'H') || (c == 'B')){ japan646 = (c == 'J'); set8 = 0; state = state0; return; } emit(ESC); emit('('); state = state0; goto again; case state4: /* two part char */ if(c < 0){ if(squawk) EPR "%s: unexpected EOF in %s\n", argv0, file); c = 0x21 | (lastc&0x80); } if(CANS2J(lastc, c)){ /* ms dos sjis */ int hi = lastc, lo = c; S2J(hi, lo); /* convert to 208 */ n = hi*100 + lo - 3232; /* convert to kuten208 */ } else n = (lastc&0x7F)*100 + (c&0x7f) - 3232; /* kuten208 */ if((n >= KUTEN208MAX) || ((l = tabkuten208[n]) == -1)){ nerrors++; if(squawk) EPR "%s: unknown kuten208 %d (from 0x%x,0x%x) near byte %ld in %s\n", argv0, n, lastc, c, input_loc, file); if(!clean) emit(BADMAP); } else { if(l < 0){ l = -l; if(squawk) EPR "%s: ambiguous kuten208 %d (mapped to 0x%lx) near byte %ld in %s\n", argv0, n, l, input_loc, file); } emit(l); } state = state0; } } /* a state machine for interpreting ms-kanji == shift-jis. */ static void ms(int c, Rune **r, long input_loc) { static enum { state0, state1, state2, state3, state4 } state = state0; static int set8 = 0; static int japan646 = 0; static int lastc; int n; long l; again: switch(state) { case state0: /* idle state */ if(c == ESC){ state = state1; return; } if(c < 0) return; if(!set8 && (c < 128)){ if(japan646){ switch(c) { case '\\': emit(0xA5); return; /* yen */ case '~': emit(0xAF); return; /* spacing macron */ default: emit(c); return; } } else { emit(c); return; } } lastc = c; state = state4; return; case state1: /* seen an escape */ if(c == '$'){ state = state2; return; } if(c == '('){ state = state3; return; } emit(ESC); state = state0; goto again; case state2: /* may be shifting into JIS */ if((c == '@') || (c == 'B')){ set8 = 1; state = state0; return; } emit(ESC); emit('$'); state = state0; goto again; case state3: /* may be shifting out of JIS */ if((c == 'J') || (c == 'H') || (c == 'B')){ japan646 = (c == 'J'); set8 = 0; state = state0; return; } emit(ESC); emit('('); state = state0; goto again; case state4: /* two part char */ if(c < 0){ if(squawk) EPR "%s: unexpected EOF in %s\n", argv0, file); c = 0x21 | (lastc&0x80); } if(CANS2J(lastc, c)){ /* ms dos sjis */ int hi = lastc, lo = c; S2J(hi, lo); /* convert to 208 */ n = hi*100 + lo - 3232; /* convert to kuten208 */ } else { nerrors++; if(squawk) EPR "%s: illegal byte pair (0x%x,0x%x) near byte %ld in %s\n", argv0, lastc, c, input_loc, file); if(!clean) emit(BADMAP); state = state0; goto again; } if((n >= KUTEN208MAX) || ((l = tabkuten208[n]) == -1)){ nerrors++; if(squawk) EPR "%s: unknown kuten208 %d (from 0x%x,0x%x) near byte %ld in %s\n", argv0, n, lastc, c, input_loc, file); if(!clean) emit(BADMAP); } else { if(l < 0){ l = -l; if(squawk) EPR "%s: ambiguous kuten208 %d (mapped to 0x%lx) near byte %ld in %s\n", argv0, n, l, input_loc, file); } emit(l); } state = state0; } } /* a state machine for interpreting ujis == EUC */ static void ujis(int c, Rune **r, long input_loc) { static enum { state0, state1 } state = state0; static int lastc; int n; long l; switch(state) { case state0: /* idle state */ if(c < 0) return; if(c < 128){ emit(c); return; } if(c == 0x8e){ /* codeset 2 */ nerrors++; if(squawk) EPR "%s: unknown codeset 2 near byte %ld in %s\n", argv0, input_loc, file); if(!clean) emit(BADMAP); return; } if(c == 0x8f){ /* codeset 3 */ nerrors++; if(squawk) EPR "%s: unknown codeset 3 near byte %ld in %s\n", argv0, input_loc, file); if(!clean) emit(BADMAP); return; } lastc = c; state = state1; return; case state1: /* two part char */ if(c < 0){ if(squawk) EPR "%s: unexpected EOF in %s\n", argv0, file); c = 0xA1; } n = (lastc&0x7F)*100 + (c&0x7F) - 3232; /* kuten208 */ if((n >= KUTEN208MAX) || ((l = tabkuten208[n]) == -1)){ nerrors++; if(squawk) EPR "%s: unknown kuten208 %d (from 0x%x,0x%x) near byte %ld in %s\n", argv0, n, lastc, c, input_loc, file); if(!clean) emit(BADMAP); } else { if(l < 0){ l = -l; if(squawk) EPR "%s: ambiguous kuten208 %d (mapped to 0x%lx) near byte %ld in %s\n", argv0, n, l, input_loc, file); } emit(l); } state = state0; } } /* a state machine for interpreting jis-kanji == 2022-JP */ static void jis(int c, Rune **r, long input_loc) { static enum { state0, state1, state2, state3, state4 } state = state0; static int set8 = 0; static int japan646 = 0; static int lastc; int n; long l; again: switch(state) { case state0: /* idle state */ if(c == ESC){ state = state1; return; } if(c < 0) return; if(!set8 && (c < 128)){ if(japan646){ switch(c) { case '\\': emit(0xA5); return; /* yen */ case '~': emit(0xAF); return; /* spacing macron */ default: emit(c); return; } } else { emit(c); return; } } lastc = c; state = state4; return; case state1: /* seen an escape */ if(c == '$'){ state = state2; return; } if(c == '('){ state = state3; return; } emit(ESC); state = state0; goto again; case state2: /* may be shifting into JIS */ if((c == '@') || (c == 'B')){ set8 = 1; state = state0; return; } emit(ESC); emit('$'); state = state0; goto again; case state3: /* may be shifting out of JIS */ if((c == 'J') || (c == 'H') || (c == 'B')){ japan646 = (c == 'J'); set8 = 0; state = state0; return; } emit(ESC); emit('('); state = state0; goto again; case state4: /* two part char */ if(c < 0){ if(squawk) EPR "%s: unexpected EOF in %s\n", argv0, file); c = 0x21 | (lastc&0x80); } if((lastc&0x80) != (c&0x80)){ /* guard against latin1 in jis */ emit(lastc); state = state0; goto again; } n = (lastc&0x7F)*100 + (c&0x7f) - 3232; /* kuten208 */ if((n >= KUTEN208MAX) || ((l = tabkuten208[n]) == -1)){ nerrors++; if(squawk) EPR "%s: unknown kuten208 %d (from 0x%x,0x%x) near byte %ld in %s\n", argv0, n, lastc, c, input_loc, file); if(!clean) emit(BADMAP); } else { if(l < 0){ l = -l; if(squawk) EPR "%s: ambiguous kuten208 %d (mapped to 0x%lx) near byte %ld in %s\n", argv0, n, l, input_loc, file); } emit(l); } state = state0; } } static void do_in(int fd, void (*procfn)(int, Rune **, long), struct convert *out) { Rune ob[N]; Rune *r, *re; uchar ibuf[N]; int n, i; long nin; r = ob; re = ob+N-3; nin = 0; while((n = read(fd, ibuf, sizeof ibuf)) > 0){ for(i = 0; i < n; i++){ (*procfn)(ibuf[i], &r, nin++); if(r >= re){ OUT(out, ob, r-ob); r = ob; } } if(r > ob){ OUT(out, ob, r-ob); r = ob; } } (*procfn)(-1, &r, nin); if(r > ob) OUT(out, ob, r-ob); OUT(out, ob, 0); } void jis_in(int fd, long *notused, struct convert *out) { USED(notused); do_in(fd, alljis, out); } void ujis_in(int fd, long *notused, struct convert *out) { USED(notused); do_in(fd, ujis, out); } void msjis_in(int fd, long *notused, struct convert *out) { USED(notused); do_in(fd, ms, out); } void jisjis_in(int fd, long *notused, struct convert *out) { USED(notused); do_in(fd, jis, out); } static int first = 1; static void tab_init(void) { int i; long l; first = 0; for(i = 0; i < NRUNE; i++) tab[i] = -1; for(i = 0; i < KUTEN208MAX; i++) if((l = tabkuten208[i]) != -1){ if(l < 0) tab[-l] = i; else tab[l] = i; } } /* jis-kanji, or ISO 2022-JP */ void jisjis_out(Rune *base, int n, long *notused) { char *p; int i; Rune r; static enum { ascii, japan646, jp2022 } state = ascii; USED(notused); if(first) tab_init(); nrunes += n; p = obuf; for(i = 0; i < n; i++){ r = base[i]; if(r < 128){ if(state == jp2022){ *p++ = ESC; *p++ = '('; *p++ = 'B'; state = ascii; } *p++ = r; } else { if(tab[r] != -1){ if(state != jp2022){ *p++ = ESC; *p++ = '$'; *p++ = 'B'; state = jp2022; } *p++ = tab[r]/100 + ' '; *p++ = tab[r]%100 + ' '; continue; } if(squawk) EPR "%s: rune 0x%x not in output cs\n", argv0, r); nerrors++; if(clean) continue; *p++ = BYTEBADMAP; } } noutput += p-obuf; if(p > obuf) write(1, obuf, p-obuf); } /* ms-kanji, or Shift-JIS */ void msjis_out(Rune *base, int n, long *notused) { char *p; int i, hi, lo; Rune r; USED(notused); if(first) tab_init(); nrunes += n; p = obuf; for(i = 0; i < n; i++){ r = base[i]; if(r < 128) *p++ = r; else { if(tab[r] != -1){ hi = tab[r]/100 + ' '; lo = tab[r]%100 + ' '; J2S(hi, lo); *p++ = hi; *p++ = lo; continue; } if(squawk) EPR "%s: rune 0x%x not in output cs\n", argv0, r); nerrors++; if(clean) continue; *p++ = BYTEBADMAP; } } noutput += p-obuf; if(p > obuf) write(1, obuf, p-obuf); } /* ujis, or EUC */ void ujis_out(Rune *base, int n, long *notused) { char *p; int i; Rune r; USED(notused); if(first) tab_init(); nrunes += n; p = obuf; for(i = 0; i < n; i++){ r = base[i]; if(r < 128) *p++ = r; else { if(tab[r] != -1){ *p++ = 0x80 | (tab[r]/100 + ' '); *p++ = 0x80 | (tab[r]%100 + ' '); continue; } if(squawk) EPR "%s: rune 0x%x not in output cs\n", argv0, r); nerrors++; if(clean) continue; *p++ = BYTEBADMAP; } } noutput += p-obuf; if(p > obuf) write(1, obuf, p-obuf); }
830b0d56e2dd817eab33da98953d5fe0d9cce13d
0851cf9dee9699a3296276705b45993e55c51592
/test/builtins/Unit/ppc/fixunstfti_test.h
d7de0ce143037284147b778971da4f23ae751169
[ "NCSA", "MIT", "LLVM-exception", "Apache-2.0" ]
permissive
apple/swift-compiler-rt
5e67c4ad59784faaa7a34b7e4824b8779e55ca48
f074ee37e8be92799cbc32bf7a8e12a3d1d4719f
refs/heads/stable
2023-03-16T10:46:27.831959
2019-10-25T22:47:20
2019-10-25T22:47:20
50,524,437
122
76
Apache-2.0
2019-10-25T22:47:21
2016-01-27T17:23:47
C
UTF-8
C
false
false
70,398
h
fixunstfti_test.h
/* * Test case inputs for: __uint128_t __fixunstfti (long double) * Conversion from long double (IBM double-double) to 128 bit integer. */ #define INFINITY __builtin_inf() #define QNAN __builtin_nan("") #define INIT_U128(HI, LO) (((__uint128_t) (HI) << 64) | (LO)) struct testCase { double hiInput; double loInput; __uint128_t result128; }; struct testCase testList[] = { { 0x0p+0, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { -0x0p+0, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { -0x0p+0, -0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x0p+0, -0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { -0x1p+0, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x1p+0, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000001 ) }, { -INFINITY, 0x0p+0, ((__uint128_t)0x0000000000000000 << 64) | 0x0000000000000000 }, { INFINITY, 0x0p+0, ((__uint128_t)0xffffffffffffffff << 64) | 0xffffffffffffffff }, { QNAN, 0x0p+0, ((__uint128_t)0x7ff8000000000000 << 64) | 0x0000000000000000 }, { -QNAN, 0x0p+0, ((__uint128_t)0x7ff8000000000000 << 64) | 0x0000000000000000 }, { -0x1p+127, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x1p+127, -0x1p+0, INIT_U128( 0x7fffffffffffffff, 0xffffffffffffffff ) }, { 0x1p+0, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000001 ) }, { 0x1p+60, 0x0p+0, INIT_U128( 0x0000000000000000, 0x1000000000000000 ) }, { 0x1p+64, -0x1p+0, INIT_U128( 0x0000000000000000, 0xffffffffffffffff ) }, { 0x1p+63, -0x1p+0, INIT_U128( 0x0000000000000000, 0x7fffffffffffffff ) }, { 0x1p+64, 0x0p+0, INIT_U128( 0x0000000000000001, 0x0000000000000000 ) }, { 0x1p+64, 0x1p+0, INIT_U128( 0x0000000000000001, 0x0000000000000001 ) }, { 0x1.8p+64, -0x1p+0, INIT_U128( 0x0000000000000001, 0x7fffffffffffffff ) }, { 0x1.1p+64, 0x0p+0, INIT_U128( 0x0000000000000001, 0x1000000000000000 ) }, { 0x1p+65, -0x1p+0, INIT_U128( 0x0000000000000001, 0xffffffffffffffff ) }, { 0x1p+127, -0x1p+64, INIT_U128( 0x7fffffffffffffff, 0x0000000000000000 ) }, { 0x1p+127, -0x1.ep+64, INIT_U128( 0x7ffffffffffffffe, 0x2000000000000000 ) }, { 0x1p+127, -0x1p+63, INIT_U128( 0x7fffffffffffffff, 0x8000000000000000 ) }, { 0x1p+124, 0x0p+0, INIT_U128( 0x1000000000000000, 0x0000000000000000 ) }, { 0x1p+124, 0x1p+0, INIT_U128( 0x1000000000000000, 0x0000000000000001 ) }, { 0x1p+124, 0x1p+63, INIT_U128( 0x1000000000000000, 0x8000000000000000 ) }, { 0x1p+124, 0x1p+64, INIT_U128( 0x1000000000000001, 0x0000000000000000 ) }, { -0x1p+64, 0x0p+0, INIT_U128( 0x00000000000000000, 0x0000000000000000 ) }, { 0x1.84p+70, 0x1.84p+6, INIT_U128( 0x0000000000000061, 0x0000000000000061 ) }, { 0x1.5cp+6, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000057 ) }, { 0x1p+64, -0x1.88p+6, INIT_U128( 0x0000000000000000, 0xffffffffffffff9e ) }, { 0x1.88p+6, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000062 ) }, { 0x1.00cp+10, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000403 ) }, { 0x1.fffffffffffffp+63, 0x1.fep+9, INIT_U128( 0x0000000000000000, 0xfffffffffffffbfc ) }, { 0x1.028p+10, 0x0p+0, INIT_U128( 0x0000000000000000, 0x000000000000040a ) }, { 0x1.44p+10, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000510 ) }, { 0x1.fffffffffffffp+63, 0x1.738p+9, INIT_U128( 0x0000000000000000, 0xfffffffffffffae7 ) }, { 0x1.808p+10, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000602 ) }, { 0x1.fffffffffffffp+63, 0x1.fdp+8, INIT_U128( 0x0000000000000000, 0xfffffffffffff9fd ) }, { 0x1.048p+13, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000002090 ) }, { 0x1.ffffffffffffbp+63, 0x1.ed8p+9, INIT_U128( 0x0000000000000000, 0xffffffffffffdbdb ) }, { 0x1.0101p+17, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000020202 ) }, { 0x1.fffffffffffbep+63, -0x1.09p+8, INIT_U128( 0x0000000000000000, 0xfffffffffffdeef7 ) }, { 0x1.9002p+17, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000032004 ) }, { 0x1.fffffffffff9cp+63, -0x1.4p+2, INIT_U128( 0x0000000000000000, 0xfffffffffffcdffb ) }, { 0x1.902p+17, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000032040 ) }, { 0x1.ffffffffff7fcp+63, -0x1.14p+6, INIT_U128( 0x0000000000000000, 0xffffffffffbfdfbb ) }, { 0x1.00822p+22, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000402088 ) }, { 0x1.0010011p+31, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000080080088 ) }, { 0x1.0a000001p+35, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000850000008 ) }, { 0x1.000000224p+37, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000002000000448 ) }, { 0x1.ffffffbffefb8p+63, -0x1p+0, INIT_U128( 0x0000000000000000, 0xffffffdfff7dbfff ) }, { 0x1.00080044p+102, 0x1.00080044p+38, INIT_U128( 0x0000004002001100, 0x0000004002001100 ) }, { 0x1.00400000018p+107, 0x1.00400000018p+43, INIT_U128( 0x000008020000000c, 0x000008020000000c ) }, { 0x1.ffffeffcp+63, -0x1.ap+3, INIT_U128( 0x0000000000000000, 0xfffff7fdfffffff3 ) }, { 0x1.000000001048p+47, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000800000000824 ) }, { 0x1.fffbffffffp+63, -0x1.808p+9, INIT_U128( 0x0000000000000000, 0xfffdffffff7ffcff ) }, { 0x1.000810004p+62, 0x0p+0, INIT_U128( 0x0000000000000000, 0x4002040010000000 ) }, { 0x1.7ffbf7ffep+63, -0x1p+0, INIT_U128( 0x0000000000000000, 0xbffdfbffefffffff ) }, { 0x1p+63, 0x0p+0, INIT_U128( 0x0000000000000000, 0x8000000000000000 ) }, { 0x1.ffffffffe8319p+63, -0x1.1f8p+9, INIT_U128( 0x0000000000000000, 0xfffffffff418c5c1 ) }, { 0x1p+68, -0x1p+0, INIT_U128( 0x000000000000000f, 0xffffffffffffffff ) }, { 0x1p+72, -0x1p+0, INIT_U128( 0x00000000000000ff, 0xffffffffffffffff ) }, { 0x1p+76, -0x1p+0, INIT_U128( 0x0000000000000fff, 0xffffffffffffffff ) }, { 0x1p+80, -0x1p+0, INIT_U128( 0x000000000000ffff, 0xffffffffffffffff ) }, { 0x1p+84, -0x1p+0, INIT_U128( 0x00000000000fffff, 0xffffffffffffffff ) }, { 0x1p+88, -0x1p+0, INIT_U128( 0x0000000000ffffff, 0xffffffffffffffff ) }, { 0x1p+92, -0x1p+0, INIT_U128( 0x000000000fffffff, 0xffffffffffffffff ) }, { 0x1p+96, -0x1p+0, INIT_U128( 0x00000000ffffffff, 0xffffffffffffffff ) }, { 0x1p+100, -0x1p+0, INIT_U128( 0x0000000fffffffff, 0xffffffffffffffff ) }, { 0x1p+104, -0x1p+0, INIT_U128( 0x000000ffffffffff, 0xffffffffffffffff ) }, { 0x1p+108, -0x1p+0, INIT_U128( 0x00000fffffffffff, 0xffffffffffffffff ) }, { 0x1p+112, -0x1p+0, INIT_U128( 0x0000ffffffffffff, 0xffffffffffffffff ) }, { 0x1p+116, -0x1p+0, INIT_U128( 0x000fffffffffffff, 0xffffffffffffffff ) }, { 0x1p+120, -0x1p+0, INIT_U128( 0x00ffffffffffffff, 0xffffffffffffffff ) }, { 0x1p+124, -0x1p+0, INIT_U128( 0x0fffffffffffffff, 0xffffffffffffffff ) }, { 0x1p+124, 0x0p+0, INIT_U128( 0x1000000000000000, 0x0000000000000000 ) }, { 0x1p+124, 0x1.1p+4, INIT_U128( 0x1000000000000000, 0x0000000000000011 ) }, { 0x1p+124, 0x1.11p+8, INIT_U128( 0x1000000000000000, 0x0000000000000111 ) }, { 0x1p+124, 0x1.111p+12, INIT_U128( 0x1000000000000000, 0x0000000000001111 ) }, { 0x1p+124, 0x1.1111p+16, INIT_U128( 0x1000000000000000, 0x0000000000011111 ) }, { 0x1p+124, 0x1.11111p+20, INIT_U128( 0x1000000000000000, 0x0000000000111111 ) }, { 0x1p+124, 0x1.111111p+24, INIT_U128( 0x1000000000000000, 0x0000000001111111 ) }, { 0x1p+124, 0x1.1111111p+28, INIT_U128( 0x1000000000000000, 0x0000000011111111 ) }, { 0x1p+124, 0x1.11111111p+32, INIT_U128( 0x1000000000000000, 0x0000000111111111 ) }, { 0x1p+124, 0x1.111111111p+36, INIT_U128( 0x1000000000000000, 0x0000001111111111 ) }, { 0x1p+124, 0x1.1111111111p+40, INIT_U128( 0x1000000000000000, 0x0000011111111111 ) }, { 0x1p+124, 0x1.11111111111p+44, INIT_U128( 0x1000000000000000, 0x0000111111111111 ) }, { 0x1p+124, 0x1.111111111111p+48, INIT_U128( 0x1000000000000000, 0x0001111111111111 ) }, { 0x1p+124, 0x1.1111111111111p+52, INIT_U128( 0x1000000000000000, 0x0011111111111111 ) }, { 0x1p+124, 0x1.11111111111111p+56, INIT_U128( 0x1000000000000000, 0x0111111111111110 ) }, { 0x1p+124, 0x1.111111111111111p+60, INIT_U128( 0x1000000000000000, 0x1111111111111100 ) }, { 0x1.6ffffffefp+63, -0x1p+0, INIT_U128( 0x0000000000000000, 0xb7ffffff77ffffff ) }, { 0x1p+106, 0x0p+0, INIT_U128( 0x0000040000000000, 0x0000000000000000 ) }, { 0x1.ff8p+29, 0x0p+0, INIT_U128( 0x0000000000000000, 0x000000003ff00000 ) }, { 0x1.6ff7ffffffffcp+63, -0x1p+0, INIT_U128( 0x0000000000000000, 0xb7fbffffffffdfff ) }, { 0x1.2400000000004p+62, 0x0p+0, INIT_U128( 0x0000000000000000, 0x4900000000001000 ) }, { 0x1.24000000001p+126, 0x1.24000000001p+62, INIT_U128( 0x4900000000040000, 0x4900000000040000 ) }, { 0x1.2400001p+126, 0x1.2400001p+62, INIT_U128( 0x4900000400000000, 0x4900000400000000 ) }, { 0x1.240001p+126, 0x1.240001p+62, INIT_U128( 0x4900004000000000, 0x4900004000000000 ) }, { 0x1.24001p+126, 0x1.24001p+62, INIT_U128( 0x4900040000000000, 0x4900040000000000 ) }, { 0x1.24008p+126, 0x1.24008p+62, INIT_U128( 0x4900200000000000, 0x4900200000000000 ) }, { 0x1.2404p+126, 0x1.2404p+62, INIT_U128( 0x4901000000000000, 0x4901000000000000 ) }, { 0x1.244p+126, 0x1.244p+62, INIT_U128( 0x4910000000000000, 0x4910000000000000 ) }, { 0x1.26p+126, 0x1.26p+62, INIT_U128( 0x4980000000000000, 0x4980000000000000 ) }, { 0x1.3p+126, 0x1.3p+62, INIT_U128( 0x4c00000000000000, 0x4c00000000000000 ) }, { 0x1.800000000001p+126, 0x1.6000000000004p+64, INIT_U128( 0x6000000000004001, 0x6000000000004000 ) }, { 0x1.cp+126, 0x1.00ep+71, INIT_U128( 0x7000000000000080, 0x7000000000000000 ) }, { 0x1.c000000000008p+126, 0x1.c000000000008p+62, INIT_U128( 0x7000000000002000, 0x7000000000002000 ) }, { 0x1.c00000000004p+126, 0x1.c00000000004p+62, INIT_U128( 0x7000000000010000, 0x7000000000010000 ) }, { 0x1.c0000000002p+126, 0x1.c0000000002p+62, INIT_U128( 0x7000000000080000, 0x7000000000080000 ) }, { 0x1.c000000002p+126, 0x1.c000000002p+62, INIT_U128( 0x7000000000800000, 0x7000000000800000 ) }, { 0x1.c00000002p+126, 0x1.c00000002p+62, INIT_U128( 0x7000000008000000, 0x7000000008000000 ) }, { 0x1.c0000008p+126, 0x1.c0000008p+62, INIT_U128( 0x7000000200000000, 0x7000000200000000 ) }, { 0x1.c000002p+126, 0x1.c000002p+62, INIT_U128( 0x7000000800000000, 0x7000000800000000 ) }, { 0x1.c00004p+126, 0x1.c00004p+62, INIT_U128( 0x7000010000000000, 0x7000010000000000 ) }, { 0x1.c0002p+126, 0x1.c0002p+62, INIT_U128( 0x7000080000000000, 0x7000080000000000 ) }, { 0x1.c008p+126, 0x1.c008p+62, INIT_U128( 0x7002000000000000, 0x7002000000000000 ) }, { 0x1.c02p+126, 0x1.c02p+62, INIT_U128( 0x7008000000000000, 0x7008000000000000 ) }, { 0x1.c2p+126, 0x1.c2p+62, INIT_U128( 0x7080000000000000, 0x7080000000000000 ) }, { 0x1.dp+126, 0x1.dp+62, INIT_U128( 0x7400000000000000, 0x7400000000000000 ) }, { 0x1.80be0cccccccdp+63, 0x1.80bc266666666p+63, INIT_U128( 0x0000000000000001, 0x80bd199999999800 ) }, { 0x1.017c19999999ap+62, 0x1.01784cccccccdp+62, INIT_U128( 0x0000000000000000, 0x80bd199999999c00 ) }, { 0x1.80be0cccccccdp+63, 0x1.01784cccccccdp+62, INIT_U128( 0x0000000000000001, 0x00bd199999999c00 ) }, { 0x1.88a1831790ce8p+63, 0x1.1143062f219d8p+62, INIT_U128( 0x0000000000000001, 0x08a1831790cea000 ) }, { 0x1.1143062f219dp+62, 0x1.88a1831790cecp+63, INIT_U128( 0x0000000000000001, 0x08a1831790cea000 ) }, { 0x1.88a1831790ce8p+63, 0x1.88a1831790cecp+63, INIT_U128( 0x0000000000000001, 0x88a1831790cea000 ) }, { 0x1.00014f3089001p+64, 0x1.e133333333333p+6, INIT_U128( 0x0000000000000001, 0x00014f3089001078 ) }, { 0x1.fffffffffffffp+127, 0x1p+75, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x1.fffffffffffffp+127, 0x1.fffffffffffffp+74, INIT_U128( 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFC00000 ) }, { 0x1.f066666666666p+6, -0x1.f066666666667p-768, INIT_U128( 0x0000000000000000, 0x000000000000007C ) }, { 0x1.f066666666666p+6, 0x1.f066666666667p-768, INIT_U128( 0x0000000000000000, 0x000000000000007C ) }, { 0x1.1111111111111p+124, 0x1.1p+68, INIT_U128( 0x1111111111111111, 0x0000000000000000 ) }, { 0x0.0000000000001p-1022, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x0.0000001160e9fp-1022, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x0.0000001a26f3cp-1022, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { -0x0.0000001134f35p-1022, -0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x0.00003f9eec3ep-1022, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x0.0a40bec0e4818p-1022, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x0.0d4e1fcc5a9c4p-1022, 0x0p+0, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x1.acf5f5ef59ebfp-1007, 0x0.00000000000a8p-1022, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x1.1f45384e3e8a7p-1007, 0x0.00000000000b4p-1022, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x1.8474983f08e93p-1007, 0x0.00000000000d9p-1022, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x1.47ad6cf88f5aep-1007, 0x0.00000000000bcp-1022, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x1.2da4480a5b489p-1, 0x1.9e20ea6f3c41dp-618, INIT_U128( 0x0000000000000000, 0x0000000000000000 ) }, { 0x1.438fba0a871f8p+0, 0x1.086e1f6e10dc4p-992, INIT_U128( 0x0000000000000000, 0x0000000000000001 ) }, { 0x1.51c874cca390ep+0, 0x1.5dd30576bba6p-992, INIT_U128( 0x0000000000000000, 0x0000000000000001 ) }, { 0x1.3691a8086d235p+1, 0x1.3670ebb66ce1ep-281, INIT_U128( 0x0000000000000000, 0x0000000000000002 ) }, { 0x1.b800c73570019p+1, 0x1.1bf9094c37f21p-281, INIT_U128( 0x0000000000000000, 0x0000000000000003 ) }, { 0x1.c1e89f3783d14p+1, 0x1.69999266d3332p-281, INIT_U128( 0x0000000000000000, 0x0000000000000003 ) }, { 0x1.390b19fa72163p+1, 0x1.25bf7f6c4b7fp-281, INIT_U128( 0x0000000000000000, 0x0000000000000002 ) }, { 0x1.4beee12897ddcp+2, 0x1.549d853aa93bp-815, INIT_U128( 0x0000000000000000, 0x0000000000000005 ) }, { 0x1.e37742bfc6ee9p+2, 0x1.081a6dda1034ep-815, INIT_U128( 0x0000000000000000, 0x0000000000000007 ) }, { 0x1.e6c0b50fcd816p+2, 0x1.c3d7967b87af3p-815, INIT_U128( 0x0000000000000000, 0x0000000000000007 ) }, { 0x1.590290feb2052p+2, 0x1.07756f600eeaep-815, INIT_U128( 0x0000000000000000, 0x0000000000000005 ) }, { 0x1.66154348cc2a8p+3, 0x1.bb93d1a97727ap-619, INIT_U128( 0x0000000000000000, 0x000000000000000b ) }, { 0x1.69cf9e9ed39f4p+3, 0x1.ce842e739d086p-619, INIT_U128( 0x0000000000000000, 0x000000000000000b ) }, { 0x1.e884574bd108bp+3, 0x1.9c6561f338cacp-619, INIT_U128( 0x0000000000000000, 0x000000000000000f ) }, { 0x1.6263a430c4c74p+4, 0x1.6b327792d664fp-117, INIT_U128( 0x0000000000000000, 0x0000000000000016 ) }, { 0x1.43637d1286c7p+4, 0x1.546df60aa8dbfp-117, INIT_U128( 0x0000000000000000, 0x0000000000000014 ) }, { 0x1.faa21259f5443p+4, 0x1.b6708ecf6ce12p-117, INIT_U128( 0x0000000000000000, 0x000000000000001f ) }, { 0x1.fd3105d1fa62p+4, 0x1.370912046e122p-117, INIT_U128( 0x0000000000000000, 0x000000000000001f ) }, { 0x1.cf952d399f2a5p+5, 0x1.0d283ebe1a508p-735, INIT_U128( 0x0000000000000000, 0x0000000000000039 ) }, { 0x1.6ac8f880d591fp+5, 0x1.ec284da5d8509p-735, INIT_U128( 0x0000000000000000, 0x000000000000002d ) }, { 0x1.919c82bf2339p+5, 0x1.a58971fd4b12ep-735, INIT_U128( 0x0000000000000000, 0x0000000000000032 ) }, { 0x1.789a89ccf1351p+5, 0x1.ebd48283d7a91p-735, INIT_U128( 0x0000000000000000, 0x000000000000002f ) }, { 0x1.8db2068d1b641p+6, 0x1.056174ca0ac2ep-802, INIT_U128( 0x0000000000000000, 0x0000000000000063 ) }, { 0x1.8d618e6f1ac32p+6, 0x1.0643da660c87cp-802, INIT_U128( 0x0000000000000000, 0x0000000000000063 ) }, { 0x1.f10fc45fe21f8p+6, 0x1.d71f2d6bae3e5p-802, INIT_U128( 0x0000000000000000, 0x000000000000007c ) }, { 0x1.1cafcb76395fap+8, 0x1.026dfe9a04dcp-78, INIT_U128( 0x0000000000000000, 0x000000000000011c ) }, { 0x1.8b9a3b5917348p+8, 0x1.f64ef081ec9dep-78, INIT_U128( 0x0000000000000000, 0x000000000000018b ) }, { 0x1.347ea22c68fd4p+8, 0x1.a86c77e750d8fp-78, INIT_U128( 0x0000000000000000, 0x0000000000000134 ) }, { 0x1.c498c82389319p+8, 0x1.0d4d96061a9b3p-78, INIT_U128( 0x0000000000000000, 0x00000000000001c4 ) }, { 0x1.3e4fa8b47c9f5p+9, 0x1.d0718139a0e3p-293, INIT_U128( 0x0000000000000000, 0x000000000000027c ) }, { 0x1.5ffd3878bffa7p+9, 0x1.1828a29c30514p-293, INIT_U128( 0x0000000000000000, 0x00000000000002bf ) }, { 0x1.bbbb3b8577768p+9, 0x1.ba79b21b74f36p-293, INIT_U128( 0x0000000000000000, 0x0000000000000377 ) }, { 0x1.8777cb810eefap+9, 0x1.bb3afdc57676p-293, INIT_U128( 0x0000000000000000, 0x000000000000030e ) }, { 0x1.8e7992a11cf32p+10, 0x1.a18e4033431c8p-789, INIT_U128( 0x0000000000000000, 0x0000000000000639 ) }, { 0x1.7684faeced0ap+10, 0x1.5f11706abe22ep-789, INIT_U128( 0x0000000000000000, 0x00000000000005da ) }, { 0x1.7d7ac11afaf58p+10, 0x1.64553beec8aa8p-789, INIT_U128( 0x0000000000000000, 0x00000000000005f5 ) }, { 0x1.a540fa454a81fp+10, 0x1.329efbd6653ep-789, INIT_U128( 0x0000000000000000, 0x0000000000000695 ) }, { 0x1.92ed812325dbp+11, 0x0.000012eafc716p-1022, INIT_U128( 0x0000000000000000, 0x0000000000000c97 ) }, { 0x1.b10abb4562158p+11, 0x0.00001e4765564p-1022, INIT_U128( 0x0000000000000000, 0x0000000000000d88 ) }, { 0x1.f6751879ecea3p+11, 0x0.000014435b4b9p-1022, INIT_U128( 0x0000000000000000, 0x0000000000000fb3 ) }, { 0x1.32e6b0a465cd6p+11, 0x0.00001729d5c09p-1022, INIT_U128( 0x0000000000000000, 0x0000000000000997 ) }, { 0x1.11f336c623e67p+12, 0x1.9d9af61f3b35fp-489, INIT_U128( 0x0000000000000000, 0x000000000000111f ) }, { 0x1.18ebab5631d76p+12, 0x1.47d8de9e8fb1cp-489, INIT_U128( 0x0000000000000000, 0x000000000000118e ) }, { 0x1.c25a29f984b45p+12, 0x1.c65b51e78cb6ap-489, INIT_U128( 0x0000000000000000, 0x0000000000001c25 ) }, { 0x1.cf37f3299e6ffp+12, 0x1.38601ed270c04p-489, INIT_U128( 0x0000000000000000, 0x0000000000001cf3 ) }, { 0x1.00db141c01b62p+13, 0x1.a4ea801149d5p-963, INIT_U128( 0x0000000000000000, 0x000000000000201b ) }, { 0x1.b81f3643703e7p+13, 0x1.849a11a509342p-963, INIT_U128( 0x0000000000000000, 0x0000000000003703 ) }, { 0x1.6dbbb6a4db777p+13, 0x1.362f46546c5e9p-963, INIT_U128( 0x0000000000000000, 0x0000000000002db7 ) }, { 0x1.eeb645abdd6c8p+13, 0x1.1edee6683dbddp-963, INIT_U128( 0x0000000000000000, 0x0000000000003dd6 ) }, { 0x1.dc7ac6d3b8f59p+14, 0x1.3a4d2846749a5p-96, INIT_U128( 0x0000000000000000, 0x000000000000771e ) }, { 0x1.51b38df4a3672p+14, 0x1.ef5f5533debeap-96, INIT_U128( 0x0000000000000000, 0x000000000000546c ) }, { 0x1.5cdcee10b9b9ep+14, 0x1.dd44c049ba898p-96, INIT_U128( 0x0000000000000000, 0x0000000000005737 ) }, { 0x1.f5266d45ea4cdp+14, 0x1.3970615e72e0cp-96, INIT_U128( 0x0000000000000000, 0x0000000000007d49 ) }, { 0x1.2ab9252a55724p+15, 0x1.a85ba3d950b74p-690, INIT_U128( 0x0000000000000000, 0x000000000000955c ) }, { 0x1.707a4edee0f4ap+15, 0x1.00541f2800a84p-690, INIT_U128( 0x0000000000000000, 0x000000000000b83d ) }, { 0x1.594c6252b298cp+15, 0x1.837b6c0706f6ep-690, INIT_U128( 0x0000000000000000, 0x000000000000aca6 ) }, { 0x1.41fad8e683f5bp+15, 0x1.7cb3a2bef9674p-690, INIT_U128( 0x0000000000000000, 0x000000000000a0fd ) }, { 0x1.f150e9b3e2a1dp+16, 0x1.155a86a62ab51p-762, INIT_U128( 0x0000000000000000, 0x000000000001f150 ) }, { 0x1.0a3ca44214794p+16, 0x1.5c85e07eb90bcp-762, INIT_U128( 0x0000000000000000, 0x0000000000010a3c ) }, { 0x1.0ef4814e1de9p+16, 0x1.2cd0510659a0ap-762, INIT_U128( 0x0000000000000000, 0x0000000000010ef4 ) }, { 0x1.99373a97326e7p+16, 0x1.98d239d731a47p-762, INIT_U128( 0x0000000000000000, 0x0000000000019937 ) }, { 0x1.0062da5400c5cp+17, 0x1.12b3124825662p-940, INIT_U128( 0x0000000000000000, 0x00000000000200c5 ) }, { 0x1.8ac0f0251581ep+17, 0x1.60b254d0c164ap-940, INIT_U128( 0x0000000000000000, 0x0000000000031581 ) }, { 0x1.51c0eb94a381ep+17, 0x1.ce1da4059c3b4p-940, INIT_U128( 0x0000000000000000, 0x000000000002a381 ) }, { 0x1.5e83e6a4bd07dp+17, 0x1.adcff7815b9ffp-940, INIT_U128( 0x0000000000000000, 0x000000000002bd07 ) }, { 0x1.242e55bc485cap+18, 0x0.000000000001fp-1022, INIT_U128( 0x0000000000000000, 0x00000000000490b9 ) }, { 0x1.7d59ac2cfab36p+18, 0x0.000000000001p-1022, INIT_U128( 0x0000000000000000, 0x000000000005f566 ) }, { 0x1.d19e6101a33ccp+18, 0x0.0000000000014p-1022, INIT_U128( 0x0000000000000000, 0x0000000000074679 ) }, { 0x1.34c9981869933p+18, 0x0.0000000000011p-1022, INIT_U128( 0x0000000000000000, 0x000000000004d326 ) }, { 0x1.c066e34f80cddp+19, 0x1.e3f363b5c7e6dp-881, INIT_U128( 0x0000000000000000, 0x00000000000e0337 ) }, { 0x1.df32bc2fbe658p+19, 0x1.df947163bf28ep-881, INIT_U128( 0x0000000000000000, 0x00000000000ef995 ) }, { 0x1.3bbc859e7779p+19, 0x1.0773506c0ee6ap-881, INIT_U128( 0x0000000000000000, 0x000000000009dde4 ) }, { 0x1.3b65fdae76ccp+19, 0x1.36924fde6d24ap-881, INIT_U128( 0x0000000000000000, 0x000000000009db2f ) }, { 0x1.52c7a810a58f5p+20, 0x1.a11a939f42352p-561, INIT_U128( 0x0000000000000000, 0x0000000000152c7a ) }, { 0x1.9546ee252a8dep+20, 0x1.eeb4a28ddd695p-561, INIT_U128( 0x0000000000000000, 0x000000000019546e ) }, { 0x1.f50465bdea08cp+20, 0x1.7288f4c2e511ep-561, INIT_U128( 0x0000000000000000, 0x00000000001f5046 ) }, { 0x1.b8199d2770334p+20, 0x1.a2d4ddfb45a9cp-561, INIT_U128( 0x0000000000000000, 0x00000000001b8199 ) }, { 0x1.efe67d0fdfccfp+21, 0x1.05ac37920b587p-121, INIT_U128( 0x0000000000000000, 0x00000000003dfccf ) }, { 0x1.a1c8a86343915p+21, 0x1.ff7f144bfefe2p-121, INIT_U128( 0x0000000000000000, 0x0000000000343915 ) }, { 0x1.0b3b76001676fp+21, 0x1.742fba58e85f8p-121, INIT_U128( 0x0000000000000000, 0x000000000021676e ) }, { 0x1.cb12f6579625fp+21, 0x1.5e77e020bcefcp-121, INIT_U128( 0x0000000000000000, 0x000000000039625e ) }, { 0x1.bd380f437a702p+22, 0x1.491fe5e8923fcp-995, INIT_U128( 0x0000000000000000, 0x00000000006f4e03 ) }, { 0x1.46fbb89c8df77p+22, 0x1.a09fc8f7413f9p-995, INIT_U128( 0x0000000000000000, 0x000000000051beee ) }, { 0x1.17e871f42fd0ep+22, 0x1.a11fc1a7423f8p-995, INIT_U128( 0x0000000000000000, 0x000000000045fa1c ) }, { 0x1.277e999a4efd3p+22, 0x1.4bd3e11097a7cp-995, INIT_U128( 0x0000000000000000, 0x000000000049dfa6 ) }, { 0x1.6e4d3250dc9a6p+23, 0x1.edf09145dbe12p-447, INIT_U128( 0x0000000000000000, 0x0000000000b72699 ) }, { 0x1.eb0413bfd6083p+23, 0x1.29c840b053908p-447, INIT_U128( 0x0000000000000000, 0x0000000000f58209 ) }, { 0x1.283f1d32507e4p+23, 0x1.06daa0fe0db54p-447, INIT_U128( 0x0000000000000000, 0x0000000000941f8e ) }, { 0x1.cf7790bd9eef2p+23, 0x1.22ebe99845d7dp-447, INIT_U128( 0x0000000000000000, 0x0000000000e7bbc8 ) }, { 0x1.39fb1e1473f64p+24, 0x1.baafa729755f5p-263, INIT_U128( 0x0000000000000000, 0x000000000139fb1e ) }, { 0x1.553510f0aa6a2p+24, 0x1.806a3d5d00d48p-263, INIT_U128( 0x0000000000000000, 0x0000000001553510 ) }, { 0x1.876715390ece3p+24, 0x1.cdf668119becdp-263, INIT_U128( 0x0000000000000000, 0x0000000001876715 ) }, { 0x1.11816ac62302ep+24, 0x1.5e8451ecbd08ap-263, INIT_U128( 0x0000000000000000, 0x000000000111816a ) }, { 0x1.3e7e811e7cfdp+25, 0x1.2dc6a5685b8d4p-155, INIT_U128( 0x0000000000000000, 0x00000000027cfd02 ) }, { 0x1.6ebc2c8cdd786p+25, 0x1.22f38cd645e72p-155, INIT_U128( 0x0000000000000000, 0x0000000002dd7859 ) }, { 0x1.421ccf068439ap+25, 0x1.bef8b6f57df17p-155, INIT_U128( 0x0000000000000000, 0x000000000284399e ) }, { 0x1.e10ee555c21dcp+25, 0x1.033cdd7a0679cp-155, INIT_U128( 0x0000000000000000, 0x0000000003c21dca ) }, { 0x1.f0b6e7ede16ddp+26, 0x1.bc0a81517815p-634, INIT_U128( 0x0000000000000000, 0x0000000007c2db9f ) }, { 0x1.f7b66dc5ef6cdp+26, 0x1.2bd3184a57a63p-634, INIT_U128( 0x0000000000000000, 0x0000000007ded9b7 ) }, { 0x1.259706244b2e1p+26, 0x1.8b7dd07716fbap-634, INIT_U128( 0x0000000000000000, 0x0000000004965c18 ) }, { 0x1.fdf5519ffbeaap+26, 0x1.19d4925433a92p-634, INIT_U128( 0x0000000000000000, 0x0000000007f7d546 ) }, { 0x1.bb13b1d776276p+27, 0x1.e509cb23ca13ap-395, INIT_U128( 0x0000000000000000, 0x000000000dd89d8e ) }, { 0x1.20754b2a40eaap+27, 0x1.bcc8cd6b7991ap-395, INIT_U128( 0x0000000000000000, 0x000000000903aa59 ) }, { 0x1.dc036999b806dp+27, 0x1.62b438eec5687p-395, INIT_U128( 0x0000000000000000, 0x000000000ee01b4c ) }, { 0x1.92b76e3d256eep+27, 0x1.33f6413067ec8p-395, INIT_U128( 0x0000000000000000, 0x000000000c95bb71 ) }, { 0x1.7a6c4408f4d88p+28, 0x1.0f6d05b41edap-716, INIT_U128( 0x0000000000000000, 0x0000000017a6c440 ) }, { 0x1.25d2c9ae4ba59p+28, 0x1.005f5a6a00becp-716, INIT_U128( 0x0000000000000000, 0x00000000125d2c9a ) }, { 0x1.c8949d0b91293p+28, 0x1.6e7ca504dcf94p-716, INIT_U128( 0x0000000000000000, 0x000000001c8949d0 ) }, { 0x1.21af1f7a435e4p+28, 0x1.98e05ef731c0cp-716, INIT_U128( 0x0000000000000000, 0x00000000121af1f7 ) }, { 0x1.307b63f060f6cp+29, 0x1.17d4949a2fa92p-112, INIT_U128( 0x0000000000000000, 0x00000000260f6c7e ) }, { 0x1.053d62740a7acp+29, 0x1.a8881e6551104p-112, INIT_U128( 0x0000000000000000, 0x0000000020a7ac4e ) }, { 0x1.9b60d35b36c1ap+29, 0x1.005bb09600b76p-112, INIT_U128( 0x0000000000000000, 0x00000000336c1a6b ) }, { 0x1.3ba73afe774e8p+29, 0x1.0efca74e1df95p-112, INIT_U128( 0x0000000000000000, 0x000000002774e75f ) }, { 0x1.dd796675baf2dp+30, 0x1.aaba00775574p-990, INIT_U128( 0x0000000000000000, 0x00000000775e599d ) }, { 0x1.8b282c8d16506p+30, 0x1.4e04f8449c09fp-990, INIT_U128( 0x0000000000000000, 0x0000000062ca0b23 ) }, { 0x1.7d6ab930fad57p+30, 0x1.764a6e3cec94ep-990, INIT_U128( 0x0000000000000000, 0x000000005f5aae4c ) }, { 0x1.6906027cd20cp+30, 0x1.d5b4ef4dab69ep-990, INIT_U128( 0x0000000000000000, 0x000000005a41809f ) }, { 0x1.04a9da360953cp+31, 0x1.6c11a2e4d8234p-857, INIT_U128( 0x0000000000000000, 0x000000008254ed1b ) }, { 0x1.fbba6e93f774ep+31, 0x1.0e9a6e5c1d34ep-857, INIT_U128( 0x0000000000000000, 0x00000000fddd3749 ) }, { 0x1.380b108470162p+31, 0x1.65c0e5f6cb81cp-857, INIT_U128( 0x0000000000000000, 0x000000009c058842 ) }, { 0x1.050dfc000a1cp+31, 0x1.1df2fc803be6p-857, INIT_U128( 0x0000000000000000, 0x000000008286fe00 ) }, { 0x1.88bf9e1d117f4p+32, 0x1.8dd4aa1b1ba95p-126, INIT_U128( 0x0000000000000000, 0x0000000188bf9e1d ) }, { 0x1.8b35d7ff166bbp+32, 0x1.91ca210923944p-126, INIT_U128( 0x0000000000000000, 0x000000018b35d7ff ) }, { 0x1.286a366250d47p+32, 0x1.012c86ac02591p-126, INIT_U128( 0x0000000000000000, 0x00000001286a3662 ) }, { 0x1.ef233cd5de467p+32, 0x1.2292a62645255p-126, INIT_U128( 0x0000000000000000, 0x00000001ef233cd5 ) }, { 0x1.917a959722f53p+33, 0x1.85a7d93f0b4fbp-478, INIT_U128( 0x0000000000000000, 0x0000000322f52b2e ) }, { 0x1.f630053bec6p+33, 0x1.f79a5227ef34bp-478, INIT_U128( 0x0000000000000000, 0x00000003ec600a77 ) }, { 0x1.1a062b14340c6p+33, 0x1.21179acc422f4p-478, INIT_U128( 0x0000000000000000, 0x00000002340c5628 ) }, { 0x1.d62acf15ac55ap+33, 0x1.bf1cd2697e39ap-478, INIT_U128( 0x0000000000000000, 0x00000003ac559e2b ) }, { 0x1.823ddfaf047bcp+34, 0x1.e2d35df1c5a6cp-649, INIT_U128( 0x0000000000000000, 0x0000000608f77ebc ) }, { 0x1.996ef6e332ddfp+34, 0x1.7af28278f5e5p-649, INIT_U128( 0x0000000000000000, 0x0000000665bbdb8c ) }, { 0x1.81a2bfc703458p+34, 0x1.acc15cd15982cp-649, INIT_U128( 0x0000000000000000, 0x00000006068aff1c ) }, { 0x1.4517e98e8a2fdp+34, 0x1.a3233fc546468p-649, INIT_U128( 0x0000000000000000, 0x00000005145fa63a ) }, { 0x1.09f551a013eaap+35, 0x0.0000000000006p-1022, INIT_U128( 0x0000000000000000, 0x000000084faa8d00 ) }, { 0x1.a2911b3d45224p+35, 0x0.0000000000005p-1022, INIT_U128( 0x0000000000000000, 0x0000000d1488d9ea ) }, { 0x1.77a301deef46p+35, 0x0.0000000000008p-1022, INIT_U128( 0x0000000000000000, 0x0000000bbd180ef7 ) }, { 0x1.f60ea85fec1d5p+35, 0x0.0000000000006p-1022, INIT_U128( 0x0000000000000000, 0x0000000fb07542ff ) }, { 0x1.75c28ed8eb852p+36, 0x1.64300234c86p-938, INIT_U128( 0x0000000000000000, 0x000000175c28ed8e ) }, { 0x1.394f8bae729f2p+36, 0x1.2119204042324p-938, INIT_U128( 0x0000000000000000, 0x0000001394f8bae7 ) }, { 0x1.94d6bc7929ad8p+36, 0x1.4a8aa2aa95154p-938, INIT_U128( 0x0000000000000000, 0x000000194d6bc792 ) }, { 0x1.1f519dcc3ea34p+36, 0x1.b4fbc9c969f79p-938, INIT_U128( 0x0000000000000000, 0x00000011f519dcc3 ) }, { 0x1.bb2fb46f765f6p+37, 0x1.cd4047139a809p-718, INIT_U128( 0x0000000000000000, 0x0000003765f68dee ) }, { 0x1.f80989d1f0131p+37, 0x1.c0546f4180a8ep-718, INIT_U128( 0x0000000000000000, 0x0000003f01313a3e ) }, { 0x1.90be9171217d2p+37, 0x1.bcc6089d798c1p-718, INIT_U128( 0x0000000000000000, 0x0000003217d22e24 ) }, { 0x1.37469d226e8d4p+37, 0x1.06aff8000d5ffp-718, INIT_U128( 0x0000000000000000, 0x00000026e8d3a44d ) }, { 0x1.2e0114905c022p+38, 0x1.298bde145317cp-115, INIT_U128( 0x0000000000000000, 0x0000004b80452417 ) }, { 0x1.77354c42ee6aap+38, 0x1.d9a75513b34eap-115, INIT_U128( 0x0000000000000000, 0x0000005dcd5310bb ) }, { 0x1.0881a80c11035p+38, 0x1.44e5e01889cbcp-115, INIT_U128( 0x0000000000000000, 0x00000042206a0304 ) }, { 0x1.a32b590f4656bp+38, 0x1.760fbd2eec1f8p-115, INIT_U128( 0x0000000000000000, 0x00000068cad643d1 ) }, { 0x1.e7bc6861cf78dp+39, 0x1.72addca8e55bcp-767, INIT_U128( 0x0000000000000000, 0x000000f3de3430e7 ) }, { 0x1.e1e11b1bc3c24p+39, 0x1.713729dae26e5p-767, INIT_U128( 0x0000000000000000, 0x000000f0f08d8de1 ) }, { 0x1.8bbb377f17767p+39, 0x1.c296d213852dap-767, INIT_U128( 0x0000000000000000, 0x000000c5dd9bbf8b ) }, { 0x1.7cb13d18f9628p+39, 0x1.8dcf87351b9f1p-767, INIT_U128( 0x0000000000000000, 0x000000be589e8c7c ) }, { 0x1.1ddbaf383bb76p+40, 0x1.20c8d9d04191bp-497, INIT_U128( 0x0000000000000000, 0x0000011ddbaf383b ) }, { 0x1.fde474e3fbc8ep+40, 0x1.7e6de35afcdbcp-497, INIT_U128( 0x0000000000000000, 0x000001fde474e3fb ) }, { 0x1.02a202b00544p+40, 0x1.311b40f462368p-497, INIT_U128( 0x0000000000000000, 0x00000102a202b005 ) }, { 0x1.ec0b6577d816cp+40, 0x1.8e49e85d1c93dp-497, INIT_U128( 0x0000000000000000, 0x000001ec0b6577d8 ) }, { 0x1.95fa4b912bf4ap+41, 0x1.295d953652bb2p-872, INIT_U128( 0x0000000000000000, 0x0000032bf4972257 ) }, { 0x1.fd243093fa486p+41, 0x1.91e0a45723c14p-872, INIT_U128( 0x0000000000000000, 0x000003fa486127f4 ) }, { 0x1.d0beeb21a17dep+41, 0x1.97f98e272ff32p-872, INIT_U128( 0x0000000000000000, 0x000003a17dd64342 ) }, { 0x1.750735faea0e6p+41, 0x1.97a4c8c92f499p-872, INIT_U128( 0x0000000000000000, 0x000002ea0e6bf5d4 ) }, { 0x1.ab409c8f56814p+42, 0x1.1e820fc23d042p-84, INIT_U128( 0x0000000000000000, 0x000006ad02723d5a ) }, { 0x1.85e79a910bcf3p+42, 0x1.75d44930eba89p-84, INIT_U128( 0x0000000000000000, 0x000006179e6a442f ) }, { 0x1.e2fa47dfc5f49p+42, 0x1.f91c1067f2382p-84, INIT_U128( 0x0000000000000000, 0x0000078be91f7f17 ) }, { 0x1.ecaf7567d95eep+42, 0x1.dd787be3baf1p-84, INIT_U128( 0x0000000000000000, 0x000007b2bdd59f65 ) }, { 0x1.4fd770a89faeep+43, 0x1.883956a11072bp-669, INIT_U128( 0x0000000000000000, 0x00000a7ebb8544fd ) }, { 0x1.b2b2aa2d65655p+43, 0x1.0c2516f2184a3p-669, INIT_U128( 0x0000000000000000, 0x00000d9595516b2b ) }, { 0x1.5848b5b4b0916p+43, 0x1.d9a0d8cfb341bp-669, INIT_U128( 0x0000000000000000, 0x00000ac245ada584 ) }, { 0x1.be7daa1f7cfb5p+43, 0x1.f0c9d223e193bp-669, INIT_U128( 0x0000000000000000, 0x00000df3ed50fbe7 ) }, { 0x1.3f6d46f07eda9p+44, 0x1.3d2fa1b27a5f4p-539, INIT_U128( 0x0000000000000000, 0x000013f6d46f07ed ) }, { 0x1.5eb8dcaebd71cp+44, 0x1.8e170e7b1c2e2p-539, INIT_U128( 0x0000000000000000, 0x000015eb8dcaebd7 ) }, { 0x1.893b63631276cp+44, 0x1.9447ca53288f9p-539, INIT_U128( 0x0000000000000000, 0x00001893b6363127 ) }, { 0x1.4e089b389c114p+44, 0x1.d191b053a3236p-539, INIT_U128( 0x0000000000000000, 0x000014e089b389c1 ) }, { 0x1.2e36d90e5c6dbp+45, 0x1.314d394c629a7p-889, INIT_U128( 0x0000000000000000, 0x000025c6db21cb8d ) }, { 0x1.7f784de4fef0ap+45, 0x1.5413e986a827dp-889, INIT_U128( 0x0000000000000000, 0x00002fef09bc9fde ) }, { 0x1.74448388e889p+45, 0x1.752c3c2cea588p-889, INIT_U128( 0x0000000000000000, 0x00002e8890711d11 ) }, { 0x1.ebb20c51d7641p+45, 0x1.50a52f7ca14a6p-889, INIT_U128( 0x0000000000000000, 0x00003d76418a3aec ) }, { 0x1.4b51066896a21p+46, 0x1.d43cc973a8799p-550, INIT_U128( 0x0000000000000000, 0x000052d4419a25a8 ) }, { 0x1.070f0d280e1e2p+46, 0x1.c25aa6dd84b55p-550, INIT_U128( 0x0000000000000000, 0x000041c3c34a0387 ) }, { 0x1.7f735ca4fee6cp+46, 0x1.a92889d752511p-550, INIT_U128( 0x0000000000000000, 0x00005fdcd7293fb9 ) }, { 0x1.72ed987ae5db3p+46, 0x1.fae14a03f5c29p-550, INIT_U128( 0x0000000000000000, 0x00005cbb661eb976 ) }, { 0x1.7352fdf0e6a6p+47, 0x1.1a64275034c85p-857, INIT_U128( 0x0000000000000000, 0x0000b9a97ef87353 ) }, { 0x1.9f4b98f33e973p+47, 0x1.657b10c0caf62p-857, INIT_U128( 0x0000000000000000, 0x0000cfa5cc799f4b ) }, { 0x1.b12eb79b625d7p+47, 0x1.4826ca96904dap-857, INIT_U128( 0x0000000000000000, 0x0000d8975bcdb12e ) }, { 0x1.6148cbcac291ap+47, 0x1.8672a1ad0ce54p-857, INIT_U128( 0x0000000000000000, 0x0000b0a465e56148 ) }, { 0x1.1df8159e3bf02p+48, 0x1.7c6dbd68f8db8p-407, INIT_U128( 0x0000000000000000, 0x00011df8159e3bf0 ) }, { 0x1.d8e17545b1c2ep+48, 0x1.959fcc5f2b3fap-407, INIT_U128( 0x0000000000000000, 0x0001d8e17545b1c2 ) }, { 0x1.ea57e075d4afcp+48, 0x1.56705400ace0ap-407, INIT_U128( 0x0000000000000000, 0x0001ea57e075d4af ) }, { 0x1.d2aa9e99a5554p+48, 0x1.9ebcab993d796p-407, INIT_U128( 0x0000000000000000, 0x0001d2aa9e99a555 ) }, { 0x1.4fe075a49fc0ep+49, 0x1.e950f533d2a1ep-694, INIT_U128( 0x0000000000000000, 0x00029fc0eb493f81 ) }, { 0x1.a936db51526dcp+49, 0x1.8a1397df14273p-694, INIT_U128( 0x0000000000000000, 0x0003526db6a2a4db ) }, { 0x1.138ce7682719dp+49, 0x1.7f879c76ff0f4p-694, INIT_U128( 0x0000000000000000, 0x00022719ced04e33 ) }, { 0x1.21e981b043d3p+49, 0x1.eaefe1f3d5dfcp-694, INIT_U128( 0x0000000000000000, 0x000243d3036087a6 ) }, { 0x1.793e9a3cf27d4p+50, 0x1.40169b90802d4p-934, INIT_U128( 0x0000000000000000, 0x0005e4fa68f3c9f5 ) }, { 0x1.7e1caadcfc396p+50, 0x1.371020466e204p-934, INIT_U128( 0x0000000000000000, 0x0005f872ab73f0e5 ) }, { 0x1.33a019d667403p+50, 0x1.9c77f7cb38effp-934, INIT_U128( 0x0000000000000000, 0x0004ce8067599d00 ) }, { 0x1.b4966ecb692cep+50, 0x1.c4dd0f8989ba2p-934, INIT_U128( 0x0000000000000000, 0x0006d259bb2da4b3 ) }, { 0x1.822ad9630455bp+51, 0x1.3fade6a07f5bdp-561, INIT_U128( 0x0000000000000000, 0x000c1156cb1822ad ) }, { 0x1.3a77dd3c74efcp+51, 0x1.55dd3018abba6p-561, INIT_U128( 0x0000000000000000, 0x0009d3bee9e3a77e ) }, { 0x1.d375773da6eafp+51, 0x1.ad40b9955a817p-561, INIT_U128( 0x0000000000000000, 0x000e9babb9ed3757 ) }, { 0x1.16059bfe2c0b4p+51, 0x1.ff801c63ff003p-561, INIT_U128( 0x0000000000000000, 0x0008b02cdff1605a ) }, { 0x1.af8f1e955f1e4p+52, 0x1.2c4cc4fa58998p-237, INIT_U128( 0x0000000000000000, 0x001af8f1e955f1e4 ) }, { 0x1.579e5322af3cap+52, 0x1.e9974457d32e8p-237, INIT_U128( 0x0000000000000000, 0x001579e5322af3ca ) }, { 0x1.2b9d921a573b2p+52, 0x1.d8798265b0f3p-237, INIT_U128( 0x0000000000000000, 0x0012b9d921a573b2 ) }, { 0x1.b746d5596e8dbp+52, 0x1.a75bfc954eb8p-237, INIT_U128( 0x0000000000000000, 0x001b746d5596e8db ) }, { 0x1.497ec4f092fd8p+53, 0x1.5c597ab2b8b3p-364, INIT_U128( 0x0000000000000000, 0x00292fd89e125fb0 ) }, { 0x1.8a65536914caap+53, 0x1.958565492b0adp-364, INIT_U128( 0x0000000000000000, 0x00314caa6d229954 ) }, { 0x1.11b7146c236e2p+53, 0x1.3154f5b662a9ep-364, INIT_U128( 0x0000000000000000, 0x002236e28d846dc4 ) }, { 0x1.f71b5e7bee36cp+53, 0x1.efc7aa5ddf8f6p-364, INIT_U128( 0x0000000000000000, 0x003ee36bcf7dc6d8 ) }, { 0x1.5a71157ab4e22p+54, 0x1.b4fd1c6b69fa4p-39, INIT_U128( 0x0000000000000000, 0x00569c455ead3888 ) }, { 0x1.4ab52e26956a6p+54, 0x1.204833ee40906p-39, INIT_U128( 0x0000000000000000, 0x0052ad4b89a55a98 ) }, { 0x1.7b9298b4f7253p+54, 0x1.084ca6f410995p-39, INIT_U128( 0x0000000000000000, 0x005ee4a62d3dc94c ) }, { 0x1.8be06c0317c0ep+54, 0x1.9677f6df2ceffp-39, INIT_U128( 0x0000000000000000, 0x0062f81b00c5f038 ) }, { 0x1.53534daca6a6ap+55, 0x1.af26be6f5e4d8p-905, INIT_U128( 0x0000000000000000, 0x00a9a9a6d6535350 ) }, { 0x1.ee7424c1dce84p+55, 0x1.38a375387146ep-905, INIT_U128( 0x0000000000000000, 0x00f73a1260ee7420 ) }, { 0x1.4275718484eaep+55, 0x1.693f342ed27e6p-905, INIT_U128( 0x0000000000000000, 0x00a13ab8c2427570 ) }, { 0x1.4e48bc049c918p+55, 0x1.30d3b39661a76p-905, INIT_U128( 0x0000000000000000, 0x00a7245e024e48c0 ) }, { 0x1.6fcb01f0df96p+56, 0x1.f3322f93e6646p-339, INIT_U128( 0x0000000000000000, 0x016fcb01f0df9600 ) }, { 0x1.6f16f2e4de2dep+56, 0x1.b50cb2d16a196p-339, INIT_U128( 0x0000000000000000, 0x016f16f2e4de2de0 ) }, { 0x1.6fcb3cb2df968p+56, 0x1.f7623e45eec48p-339, INIT_U128( 0x0000000000000000, 0x016fcb3cb2df9680 ) }, { 0x1.a41a78314834fp+56, 0x1.ee812a93dd026p-339, INIT_U128( 0x0000000000000000, 0x01a41a78314834f0 ) }, { 0x1.73544f7ce6a8ap+57, 0x1.fbf6a069f7ed4p-786, INIT_U128( 0x0000000000000000, 0x02e6a89ef9cd5140 ) }, { 0x1.8d4beb3f1a97ep+57, 0x1.6f6e15a0dedc2p-786, INIT_U128( 0x0000000000000000, 0x031a97d67e352fc0 ) }, { 0x1.70dfc328e1bf8p+57, 0x1.56963a34ad2c8p-786, INIT_U128( 0x0000000000000000, 0x02e1bf8651c37f00 ) }, { 0x1.6e5e39acdcbc7p+57, 0x1.62dfb7d4c5bf7p-786, INIT_U128( 0x0000000000000000, 0x02dcbc7359b978e0 ) }, { 0x1.10a375142146ep+58, 0x1.dde963f1bbd2cp-687, INIT_U128( 0x0000000000000000, 0x04428dd450851b80 ) }, { 0x1.7eacb1acfd596p+58, 0x1.e59952a9cb32bp-687, INIT_U128( 0x0000000000000000, 0x05fab2c6b3f56580 ) }, { 0x1.3f2bac4a7e576p+58, 0x1.d21ee367a43ddp-687, INIT_U128( 0x0000000000000000, 0x04fcaeb129f95d80 ) }, { 0x1.be738acb7ce71p+58, 0x1.d4b6334fa96c7p-687, INIT_U128( 0x0000000000000000, 0x06f9ce2b2df39c40 ) }, { 0x1.b322eff56645ep+59, 0x0.00000014b8158p-1022, INIT_U128( 0x0000000000000000, 0x0d99177fab322f00 ) }, { 0x1.b8dfbdbd71bf8p+59, 0x0.00000010ac2d6p-1022, INIT_U128( 0x0000000000000000, 0x0dc6fdedeb8dfc00 ) }, { 0x1.e45f6d33c8bedp+59, 0x0.0000001c79003p-1022, INIT_U128( 0x0000000000000000, 0x0f22fb699e45f680 ) }, { 0x1.10c7106e218e2p+59, 0x0.0000001ea2457p-1022, INIT_U128( 0x0000000000000000, 0x08863883710c7100 ) }, { 0x1.c48c230989185p+60, 0x1.a60d3fb34c1a8p-116, INIT_U128( 0x0000000000000000, 0x1c48c23098918500 ) }, { 0x1.5e9345fabd268p+60, 0x1.4898e6d49131dp-116, INIT_U128( 0x0000000000000000, 0x15e9345fabd26800 ) }, { 0x1.b56942576ad28p+60, 0x1.aff4a0655fe94p-116, INIT_U128( 0x0000000000000000, 0x1b56942576ad2800 ) }, { 0x1.7f865930ff0cbp+60, 0x1.13a0876e27411p-116, INIT_U128( 0x0000000000000000, 0x17f865930ff0cb00 ) }, { 0x1.ef482c31de906p+61, 0x1.43e655d887ccap-501, INIT_U128( 0x0000000000000000, 0x3de905863bd20c00 ) }, { 0x1.9fa15a7d3f42bp+61, 0x1.b00fcc55601fap-501, INIT_U128( 0x0000000000000000, 0x33f42b4fa7e85600 ) }, { 0x1.d2c465fda588dp+61, 0x1.98c2f6e73185fp-501, INIT_U128( 0x0000000000000000, 0x3a588cbfb4b11a00 ) }, { 0x1.f038608de070cp+61, 0x1.7b4fa8a0f69f5p-501, INIT_U128( 0x0000000000000000, 0x3e070c11bc0e1800 ) }, { 0x1.adfb2db35bf66p+62, 0x1.38efaf6271df6p+8, INIT_U128( 0x0000000000000000, 0x6b7ecb6cd6fd9938 ) }, { 0x1.1679474c2cf29p+62, 0x1.ae04d7f95c09bp+8, INIT_U128( 0x0000000000000000, 0x459e51d30b3ca5ae ) }, { 0x1.890c63b91218cp+62, 0x1.133030ac26606p+8, INIT_U128( 0x0000000000000000, 0x624318ee44863113 ) }, { 0x1.08fc576811f8bp+62, 0x1.521d194ea43a3p+8, INIT_U128( 0x0000000000000000, 0x423f15da047e2d52 ) }, { 0x1.5c2e1ea2b85c4p+63, 0x1.bbf1e79d77e3dp-836, INIT_U128( 0x0000000000000000, 0xae170f515c2e2000 ) }, { 0x1.3a1d0742743a1p+63, 0x1.849ecbad093dap-836, INIT_U128( 0x0000000000000000, 0x9d0e83a13a1d0800 ) }, { 0x1.ac698c2758d32p+63, 0x1.7a316edaf462ep-836, INIT_U128( 0x0000000000000000, 0xd634c613ac699000 ) }, { 0x1.8542412f0a848p+63, 0x1.a53fa9cd4a7f5p-836, INIT_U128( 0x0000000000000000, 0xc2a1209785424000 ) }, { 0x1.f526fb77ea4ep+64, 0x1.170327882e065p-848, INIT_U128( 0x0000000000000001, 0xf526fb77ea4e0000 ) }, { 0x1.acca54155994ap+64, 0x1.4c44fdb4988ap-848, INIT_U128( 0x0000000000000001, 0xacca54155994a000 ) }, { 0x1.b47ed77768fdbp+64, 0x1.e6883245cd107p-848, INIT_U128( 0x0000000000000001, 0xb47ed77768fdb000 ) }, { 0x1.bf32165b7e643p+64, 0x1.7da93100fb526p-848, INIT_U128( 0x0000000000000001, 0xbf32165b7e643000 ) }, { 0x1.c6aa72a58d54fp+65, 0x1.700d04ece01ap-810, INIT_U128( 0x0000000000000003, 0x8d54e54b1aa9e000 ) }, { 0x1.651ffffcca4p+65, 0x1.b6e3b8e56dc77p-810, INIT_U128( 0x0000000000000002, 0xca3ffff994800000 ) }, { 0x1.f59076c9eb20fp+65, 0x1.41622b1082c46p-810, INIT_U128( 0x0000000000000003, 0xeb20ed93d641e000 ) }, { 0x1.2362224a46c44p+65, 0x1.0fe4f0321fc9ep-810, INIT_U128( 0x0000000000000002, 0x46c444948d888000 ) }, { 0x1.96643d852cc88p+66, 0x1.5aadaff0b55b6p-820, INIT_U128( 0x0000000000000006, 0x5990f614b3220000 ) }, { 0x1.38a95f0e7152cp+66, 0x1.8432d89b0865bp-820, INIT_U128( 0x0000000000000004, 0xe2a57c39c54b0000 ) }, { 0x1.b674a85b6ce95p+66, 0x1.3adbee1a75b7ep-820, INIT_U128( 0x0000000000000006, 0xd9d2a16db3a54000 ) }, { 0x1.81b2bc3303658p+66, 0x1.0e771c4e1cee4p-820, INIT_U128( 0x0000000000000006, 0x06caf0cc0d960000 ) }, { 0x1.017e066002fc1p+67, 0x1.69eb9d80d3d74p-860, INIT_U128( 0x0000000000000008, 0x0bf0330017e08000 ) }, { 0x1.b75b9b136eb74p+67, 0x1.ddf2ec69bbe5ep-860, INIT_U128( 0x000000000000000d, 0xbadcd89b75ba0000 ) }, { 0x1.71432fe4e2866p+67, 0x1.cbea0a3797d41p-860, INIT_U128( 0x000000000000000b, 0x8a197f2714330000 ) }, { 0x1.65e3ce88cbc7ap+67, 0x1.dd466e4dba8cep-860, INIT_U128( 0x000000000000000b, 0x2f1e74465e3d0000 ) }, { 0x1.d76842dfaed09p+68, 0x1.d4739f6ba8e74p-740, INIT_U128( 0x000000000000001d, 0x76842dfaed090000 ) }, { 0x1.9180cb312301ap+68, 0x1.5961b442b2c36p-740, INIT_U128( 0x0000000000000019, 0x180cb312301a0000 ) }, { 0x1.5ea7abd8bd4f6p+68, 0x1.0afd825415fbp-740, INIT_U128( 0x0000000000000015, 0xea7abd8bd4f60000 ) }, { 0x1.bcf6493f79ec9p+68, 0x1.39f6643a73eccp-740, INIT_U128( 0x000000000000001b, 0xcf6493f79ec90000 ) }, { 0x1.6c264bbad84cap+69, 0x1.3d2b92de7a572p-358, INIT_U128( 0x000000000000002d, 0x84c9775b09940000 ) }, { 0x1.13b3e09a2767cp+69, 0x1.a3ead92f47d5bp-358, INIT_U128( 0x0000000000000022, 0x767c1344ecf80000 ) }, { 0x1.8518219d0a304p+69, 0x1.c9a99edf93534p-358, INIT_U128( 0x0000000000000030, 0xa30433a146080000 ) }, { 0x1.afa032e75f406p+69, 0x1.76f3e70cede7dp-358, INIT_U128( 0x0000000000000035, 0xf4065cebe80c0000 ) }, { 0x1.1aa2f5343545ep+70, 0x1.cd612ccd9ac25p-491, INIT_U128( 0x0000000000000046, 0xa8bd4d0d51780000 ) }, { 0x1.2c8c2e1a59186p+70, 0x1.53ac1260a7582p-491, INIT_U128( 0x000000000000004b, 0x230b869646180000 ) }, { 0x1.b92d16ef725a3p+70, 0x1.05faddde0bf5cp-491, INIT_U128( 0x000000000000006e, 0x4b45bbdc968c0000 ) }, { 0x1.9fc802a33f9p+70, 0x1.203a627a4074cp-491, INIT_U128( 0x0000000000000067, 0xf200a8cfe4000000 ) }, { 0x1.240746b6480e9p+71, 0x1.78c39518f1872p-676, INIT_U128( 0x0000000000000092, 0x03a35b2407480000 ) }, { 0x1.863a24750c744p+71, 0x1.96d2b31d2da56p-676, INIT_U128( 0x00000000000000c3, 0x1d123a863a200000 ) }, { 0x1.597fbe8ab2ff8p+71, 0x1.93afb023275f6p-676, INIT_U128( 0x00000000000000ac, 0xbfdf45597fc00000 ) }, { 0x1.e1080a67c2102p+71, 0x1.b5c9f2a36b93ep-676, INIT_U128( 0x00000000000000f0, 0x840533e108100000 ) }, { 0x1.5c1897a6b8313p+72, 0x1.e08b1a6fc1164p-272, INIT_U128( 0x000000000000015c, 0x1897a6b831300000 ) }, { 0x1.9ba232cf37446p+72, 0x1.5f66bf90becd8p-272, INIT_U128( 0x000000000000019b, 0xa232cf3744600000 ) }, { 0x1.595f744cb2beep+72, 0x1.f7a95a67ef52cp-272, INIT_U128( 0x0000000000000159, 0x5f744cb2bee00000 ) }, { 0x1.a763ae594ec76p+72, 0x1.c295524f852aap-272, INIT_U128( 0x00000000000001a7, 0x63ae594ec7600000 ) }, { 0x1.06eca6c40dd95p+73, 0x1.f918431ff2309p-572, INIT_U128( 0x000000000000020d, 0xd94d881bb2a00000 ) }, { 0x1.4f9fc82a9f3f9p+73, 0x1.257089f24ae11p-572, INIT_U128( 0x000000000000029f, 0x3f90553e7f200000 ) }, { 0x1.0fa3bdc41f478p+73, 0x1.1ca9162039523p-572, INIT_U128( 0x000000000000021f, 0x477b883e8f000000 ) }, { 0x1.be3be7ef7c77dp+73, 0x1.ae73d50d5ce7bp-572, INIT_U128( 0x000000000000037c, 0x77cfdef8efa00000 ) }, { 0x1.da6d4389b4da8p+74, 0x1.1806570a300cbp-230, INIT_U128( 0x0000000000000769, 0xb50e26d36a000000 ) }, { 0x1.55276624aa4edp+74, 0x1.004fb390009f6p-230, INIT_U128( 0x0000000000000554, 0x9d9892a93b400000 ) }, { 0x1.aeab3c995d568p+74, 0x1.08d9156011b22p-230, INIT_U128( 0x00000000000006ba, 0xacf265755a000000 ) }, { 0x1.a281549f4502ap+74, 0x1.cb98cbdf9731ap-230, INIT_U128( 0x000000000000068a, 0x05527d140a800000 ) }, { 0x1.35dae4746bb5cp+75, 0x1.492edd3c925dcp-684, INIT_U128( 0x00000000000009ae, 0xd723a35dae000000 ) }, { 0x1.e6b8db83cd71cp+75, 0x1.e8282f8fd0506p-684, INIT_U128( 0x0000000000000f35, 0xc6dc1e6b8e000000 ) }, { 0x1.17587f082eb1p+75, 0x1.45ebb9f28bd77p-684, INIT_U128( 0x00000000000008ba, 0xc3f8417588000000 ) }, { 0x1.957ac7292af59p+75, 0x1.35b408566b681p-684, INIT_U128( 0x0000000000000cab, 0xd6394957ac800000 ) }, { 0x1.6e0e0850dc1c1p+76, 0x1.9e623e393cc48p-1002, INIT_U128( 0x00000000000016e0, 0xe0850dc1c1000000 ) }, { 0x1.90fee6ff21fddp+76, 0x1.7ceca2caf9d94p-1002, INIT_U128( 0x000000000000190f, 0xee6ff21fdd000000 ) }, { 0x1.5798708eaf30ep+76, 0x1.d3322f4fa6646p-1002, INIT_U128( 0x0000000000001579, 0x8708eaf30e000000 ) }, { 0x1.c2ef5f4185decp+76, 0x1.96ad4d692d5aap-1002, INIT_U128( 0x0000000000001c2e, 0xf5f4185dec000000 ) }, { 0x1.ae14b81f5c297p+77, 0x1.062f208c0c5e4p-169, INIT_U128( 0x00000000000035c2, 0x9703eb852e000000 ) }, { 0x1.1f2ef58a3e5dep+77, 0x1.97a029192f405p-169, INIT_U128( 0x00000000000023e5, 0xdeb147cbbc000000 ) }, { 0x1.74861d64e90c4p+77, 0x1.fb289c69f6513p-169, INIT_U128( 0x0000000000002e90, 0xc3ac9d2188000000 ) }, { 0x1.11782bc422f06p+77, 0x1.fe294db5fc529p-169, INIT_U128( 0x000000000000222f, 0x0578845e0c000000 ) }, { 0x1.3af34bd275e6ap+78, 0x1.ba66054574cc1p-910, INIT_U128( 0x0000000000004ebc, 0xd2f49d79a8000000 ) }, { 0x1.0708e3fc0e11cp+78, 0x1.09ae142c135c2p-910, INIT_U128( 0x00000000000041c2, 0x38ff038470000000 ) }, { 0x1.c313a69786275p+78, 0x1.fc165a27f82ccp-910, INIT_U128( 0x00000000000070c4, 0xe9a5e189d4000000 ) }, { 0x1.990c9ad532193p+78, 0x1.072499060e493p-910, INIT_U128( 0x0000000000006643, 0x26b54c864c000000 ) }, { 0x1.dd2363c1ba46cp+79, 0x1.d163c99ba2c79p-815, INIT_U128( 0x000000000000ee91, 0xb1e0dd2360000000 ) }, { 0x1.b0ae4ad1615c9p+79, 0x1.8f2f90f91e5f2p-815, INIT_U128( 0x000000000000d857, 0x2568b0ae48000000 ) }, { 0x1.9a26bbb7344d8p+79, 0x1.ed90d6d9db21bp-815, INIT_U128( 0x000000000000cd13, 0x5ddb9a26c0000000 ) }, { 0x1.71ec17ace3d83p+79, 0x1.ec2b79cfd856fp-815, INIT_U128( 0x000000000000b8f6, 0x0bd671ec18000000 ) }, { 0x1.689f9cb2d13f4p+80, 0x1.adfbd9175bf7bp-935, INIT_U128( 0x000000000001689f, 0x9cb2d13f40000000 ) }, { 0x1.cde2888d9bc51p+80, 0x1.0d3598f01a6b3p-935, INIT_U128( 0x000000000001cde2, 0x888d9bc510000000 ) }, { 0x1.6866c948d0cd9p+80, 0x1.0d9da3cc1b3b4p-935, INIT_U128( 0x0000000000016866, 0xc948d0cd90000000 ) }, { 0x1.eee79cbdddcf3p+80, 0x1.a60bf9374c17fp-935, INIT_U128( 0x000000000001eee7, 0x9cbdddcf30000000 ) }, { 0x1.3a27b29c744f6p+81, 0x1.1270039224ep-231, INIT_U128( 0x000000000002744f, 0x6538e89ec0000000 ) }, { 0x1.608a6c38c114ep+81, 0x1.a6ff1b154dfe4p-231, INIT_U128( 0x000000000002c114, 0xd8718229c0000000 ) }, { 0x1.b8ddf2c971bbep+81, 0x1.7a6c452cf4d88p-231, INIT_U128( 0x00000000000371bb, 0xe592e377c0000000 ) }, { 0x1.34056f04680aep+81, 0x1.3aa39ba075474p-231, INIT_U128( 0x000000000002680a, 0xde08d015c0000000 ) }, { 0x1.df36567dbe6cbp+82, 0x1.948aa54b29155p-104, INIT_U128( 0x0000000000077cd9, 0x59f6f9b2c0000000 ) }, { 0x1.00c5bf20018b8p+82, 0x1.0354f44e06a9ep-104, INIT_U128( 0x0000000000040316, 0xfc80062e00000000 ) }, { 0x1.5a6d471ab4da9p+82, 0x1.ea755ca5d4eabp-104, INIT_U128( 0x00000000000569b5, 0x1c6ad36a40000000 ) }, { 0x1.58acff6eb15ap+82, 0x1.f6c3b1b9ed876p-104, INIT_U128( 0x00000000000562b3, 0xfdbac56800000000 ) }, { 0x1.9288c20b25118p+83, 0x1.477be5208ef7cp-445, INIT_U128( 0x00000000000c9446, 0x1059288c00000000 ) }, { 0x1.3556fa5c6aaep+83, 0x1.f200a591e4014p-445, INIT_U128( 0x000000000009aab7, 0xd2e3557000000000 ) }, { 0x1.88dec0dd11bd8p+83, 0x1.a1ceac19439d6p-445, INIT_U128( 0x00000000000c46f6, 0x06e88dec00000000 ) }, { 0x1.603498e4c0693p+83, 0x1.94ccf0d52999ep-445, INIT_U128( 0x00000000000b01a4, 0xc726034980000000 ) }, { 0x1.1dfbb7a43bf77p+84, 0x1.d7dd8bdbafbb2p-926, INIT_U128( 0x000000000011dfbb, 0x7a43bf7700000000 ) }, { 0x1.5f5d18b8beba3p+84, 0x1.ac1b923558372p-926, INIT_U128( 0x000000000015f5d1, 0x8b8beba300000000 ) }, { 0x1.8b32b85d16657p+84, 0x1.37ae11cc6f5c2p-926, INIT_U128( 0x000000000018b32b, 0x85d1665700000000 ) }, { 0x1.506f56eca0debp+84, 0x1.185445da30a88p-926, INIT_U128( 0x00000000001506f5, 0x6eca0deb00000000 ) }, { 0x1.506cf3dea0d9ep+85, 0x1.2e68e2945cd1cp-635, INIT_U128( 0x00000000002a0d9e, 0x7bd41b3c00000000 ) }, { 0x1.99ef268733de5p+85, 0x1.2ce0960e59c13p-635, INIT_U128( 0x0000000000333de4, 0xd0e67bca00000000 ) }, { 0x1.d46cd273a8d9ap+85, 0x1.fb0bae61f6176p-635, INIT_U128( 0x00000000003a8d9a, 0x4e751b3400000000 ) }, { 0x1.31deaa8263bd6p+85, 0x1.8a752b4514ea6p-635, INIT_U128( 0x0000000000263bd5, 0x504c77ac00000000 ) }, { 0x1.95956f032b2aep+86, 0x1.ddd18753bba31p-535, INIT_U128( 0x000000000065655b, 0xc0cacab800000000 ) }, { 0x1.db4b6705b696dp+86, 0x1.fc438061f887p-535, INIT_U128( 0x000000000076d2d9, 0xc16da5b400000000 ) }, { 0x1.42c9320885926p+86, 0x1.9258f3ab24b1ep-535, INIT_U128( 0x000000000050b24c, 0x8221649800000000 ) }, { 0x1.08ca2a0e11946p+86, 0x1.1c860974390c1p-535, INIT_U128( 0x000000000042328a, 0x8384651800000000 ) }, { 0x1.ddf27f51bbe5p+87, 0x1.a776e8c94eeddp-479, INIT_U128( 0x0000000000eef93f, 0xa8ddf28000000000 ) }, { 0x1.3f5b6af47eb6ep+87, 0x1.cf47dd9d9e8fcp-479, INIT_U128( 0x00000000009fadb5, 0x7a3f5b7000000000 ) }, { 0x1.4b9d6480973acp+87, 0x1.c249100d84922p-479, INIT_U128( 0x0000000000a5ceb2, 0x404b9d6000000000 ) }, { 0x1.eea053a5dd40bp+87, 0x1.26e6f8d24dcdfp-479, INIT_U128( 0x0000000000f75029, 0xd2eea05800000000 ) }, { 0x1.4e0a84329c15p+88, 0x1.b969043772d2p-931, INIT_U128( 0x00000000014e0a84, 0x329c150000000000 ) }, { 0x1.20fcf75c41f9fp+88, 0x1.a487f5bf490ffp-931, INIT_U128( 0x000000000120fcf7, 0x5c41f9f000000000 ) }, { 0x1.0937a468126f4p+88, 0x1.dd15685bba2adp-931, INIT_U128( 0x00000000010937a4, 0x68126f4000000000 ) }, { 0x1.3a1b94d674372p+88, 0x1.0e98a7441d315p-931, INIT_U128( 0x00000000013a1b94, 0xd674372000000000 ) }, { 0x1.b9b702f1736ep+89, 0x1.afdf8f8b5fbf2p-758, INIT_U128( 0x0000000003736e05, 0xe2e6dc0000000000 ) }, { 0x1.f93973b7f272fp+89, 0x1.77696130eed2cp-758, INIT_U128( 0x0000000003f272e7, 0x6fe4e5e000000000 ) }, { 0x1.85595b3b0ab2cp+89, 0x1.4c1c459298388p-758, INIT_U128( 0x00000000030ab2b6, 0x7615658000000000 ) }, { 0x1.89e4ed0b13c9ep+89, 0x1.4c88ddd89911cp-758, INIT_U128( 0x000000000313c9da, 0x162793c000000000 ) }, { 0x1.6d0dfe6ada1cp+90, 0x1.0873b16610e76p+20, INIT_U128( 0x0000000005b437f9, 0xab6870000010873b ) }, { 0x1.403e37e4807c7p+90, 0x1.630feeecc61fep+20, INIT_U128( 0x000000000500f8df, 0x9201f1c0001630fe ) }, { 0x1.1d3cdade3a79cp+90, 0x1.ecceb30bd99d7p+20, INIT_U128( 0x000000000474f36b, 0x78e9e700001ecceb ) }, { 0x1.f50698adea0d3p+90, 0x1.4ed5f3749dabep+20, INIT_U128( 0x0000000007d41a62, 0xb7a834c00014ed5f ) }, { 0x1.d869b87fb0d37p+91, 0x1.53d108a0a7a21p-525, INIT_U128( 0x000000000ec34dc3, 0xfd869b8000000000 ) }, { 0x1.cd078fb39a0f2p+91, 0x1.228b56084516bp-525, INIT_U128( 0x000000000e683c7d, 0x9cd0790000000000 ) }, { 0x1.c67dbd798cfb7p+91, 0x1.65e1ed28cbc3ep-525, INIT_U128( 0x000000000e33edeb, 0xcc67db8000000000 ) }, { 0x1.c41a2ed388346p+91, 0x1.4799717a8f32ep-525, INIT_U128( 0x000000000e20d176, 0x9c41a30000000000 ) }, { 0x1.db416739b682dp+92, 0x1.fea650affd4cap-706, INIT_U128( 0x000000001db41673, 0x9b682d0000000000 ) }, { 0x1.872189f10e431p+92, 0x1.e1de445fc3bc8p-706, INIT_U128( 0x000000001872189f, 0x10e4310000000000 ) }, { 0x1.d2ad0fd1a55a2p+92, 0x1.0a06ac7e140d6p-706, INIT_U128( 0x000000001d2ad0fd, 0x1a55a20000000000 ) }, { 0x1.2535c3a84a6b8p+92, 0x1.65205312ca40ap-706, INIT_U128( 0x0000000012535c3a, 0x84a6b80000000000 ) }, { 0x1.dd518ce9baa31p+93, 0x1.b123211362464p-663, INIT_U128( 0x000000003baa319d, 0x3754620000000000 ) }, { 0x1.9a89da733513bp+93, 0x1.8c0a0b2b18142p-663, INIT_U128( 0x0000000033513b4e, 0x66a2760000000000 ) }, { 0x1.01fc693203f8dp+93, 0x1.81040a6d02081p-663, INIT_U128( 0x00000000203f8d26, 0x407f1a0000000000 ) }, { 0x1.1d9ae72e3b35dp+93, 0x1.fb816ce9f702dp-663, INIT_U128( 0x0000000023b35ce5, 0xc766ba0000000000 ) }, { 0x1.1b8311c037062p+94, 0x1.3b413a6c76828p-946, INIT_U128( 0x0000000046e0c470, 0x0dc1880000000000 ) }, { 0x1.e7c1239fcf825p+94, 0x1.e89cbe61d1398p-946, INIT_U128( 0x0000000079f048e7, 0xf3e0940000000000 ) }, { 0x1.3ba2c92677459p+94, 0x1.4c19bb4098338p-946, INIT_U128( 0x000000004ee8b249, 0x9dd1640000000000 ) }, { 0x1.e81787a3d02f1p+94, 0x1.21981a6a43304p-946, INIT_U128( 0x000000007a05e1e8, 0xf40bc40000000000 ) }, { 0x1.e18ca9a3c3195p+95, 0x1.d2ce473ba59c9p-353, INIT_U128( 0x00000000f0c654d1, 0xe18ca80000000000 ) }, { 0x1.ec1a5457d834ap+95, 0x1.673af5f4ce75ep-353, INIT_U128( 0x00000000f60d2a2b, 0xec1a500000000000 ) }, { 0x1.3d4fcc727a9fap+95, 0x1.d577142daaee2p-353, INIT_U128( 0x000000009ea7e639, 0x3d4fd00000000000 ) }, { 0x1.6b318358d663p+95, 0x1.d96b9445b2d72p-353, INIT_U128( 0x00000000b598c1ac, 0x6b31800000000000 ) }, { 0x1.f8fedfa1f1fdcp+96, 0x1.6e54dd28dca9cp-828, INIT_U128( 0x00000001f8fedfa1, 0xf1fdc00000000000 ) }, { 0x1.4b5ec85896bd9p+96, 0x1.e4251105c84a2p-828, INIT_U128( 0x000000014b5ec858, 0x96bd900000000000 ) }, { 0x1.bc8f0397791ep+96, 0x1.b514998d6a293p-828, INIT_U128( 0x00000001bc8f0397, 0x791e000000000000 ) }, { 0x1.056a2dfe0ad46p+96, 0x1.c98d1a15931a3p-828, INIT_U128( 0x00000001056a2dfe, 0x0ad4600000000000 ) }, { 0x1.21192da842326p+97, 0x1.64dbdea4c9b7cp-314, INIT_U128( 0x0000000242325b50, 0x8464c00000000000 ) }, { 0x1.95c269f12b84dp+97, 0x1.31bfb62e637f7p-314, INIT_U128( 0x000000032b84d3e2, 0x5709a00000000000 ) }, { 0x1.f4a37e69e947p+97, 0x1.2c5cc8d658b99p-314, INIT_U128( 0x00000003e946fcd3, 0xd28e000000000000 ) }, { 0x1.73c765e6e78ecp+97, 0x1.34b3a3f469674p-314, INIT_U128( 0x00000002e78ecbcd, 0xcf1d800000000000 ) }, { 0x1.cafa773f95f4fp+98, 0x1.28d3338851a66p-207, INIT_U128( 0x000000072be9dcfe, 0x57d3c00000000000 ) }, { 0x1.7b7b6aa4f6f6ep+98, 0x1.2c99252259324p-207, INIT_U128( 0x00000005ededaa93, 0xdbdb800000000000 ) }, { 0x1.8c39a15918734p+98, 0x1.cdcd60b79b9acp-207, INIT_U128( 0x0000000630e68564, 0x61cd000000000000 ) }, { 0x1.da220eb5b4442p+98, 0x1.cd0b52b19a16bp-207, INIT_U128( 0x0000000768883ad6, 0xd110800000000000 ) }, { 0x1.0f34e6fa1e69dp+99, 0x1.596be5d4b2d7cp-575, INIT_U128( 0x0000000879a737d0, 0xf34e800000000000 ) }, { 0x1.5318af1aa6316p+99, 0x1.b2d7a70f65af5p-575, INIT_U128( 0x0000000a98c578d5, 0x318b000000000000 ) }, { 0x1.2f3f14005e7e2p+99, 0x1.bf1a11977e342p-575, INIT_U128( 0x0000000979f8a002, 0xf3f1000000000000 ) }, { 0x1.c95da71792bb5p+99, 0x1.b673d5896ce7bp-575, INIT_U128( 0x0000000e4aed38bc, 0x95da800000000000 ) }, { 0x1.fdead1dffbd5ap+100, 0x1.5a750c74b4ea2p-189, INIT_U128( 0x0000001fdead1dff, 0xbd5a000000000000 ) }, { 0x1.fe8116bbfd023p+100, 0x1.c0314d4580629p-189, INIT_U128( 0x0000001fe8116bbf, 0xd023000000000000 ) }, { 0x1.9177917922ef2p+100, 0x1.b5d94c0f6bb2ap-189, INIT_U128( 0x0000001917791792, 0x2ef2000000000000 ) }, { 0x1.39ab1bf273564p+100, 0x1.4de96f889bd2ep-189, INIT_U128( 0x000000139ab1bf27, 0x3564000000000000 ) }, { 0x1.52e21a8aa5c44p+101, 0x0.0000075bfbb25p-1022, INIT_U128( 0x0000002a5c435154, 0xb888000000000000 ) }, { 0x1.c362c16186c58p+101, 0x0.00000417370ap-1022, INIT_U128( 0x000000386c582c30, 0xd8b0000000000000 ) }, { 0x1.dcbb50a5b976ap+101, 0x0.000005dcb4b01p-1022, INIT_U128( 0x0000003b976a14b7, 0x2ed4000000000000 ) }, { 0x1.fae77febf5cfp+101, 0x0.00000567e1492p-1022, INIT_U128( 0x0000003f5ceffd7e, 0xb9e0000000000000 ) }, { 0x1.b94feaf3729fdp+102, 0x1.eb191b6bd6324p-32, INIT_U128( 0x0000006e53fabcdc, 0xa7f4000000000000 ) }, { 0x1.ffcd483fff9a9p+102, 0x1.f6c951e5ed92ap-32, INIT_U128( 0x0000007ff3520fff, 0xe6a4000000000000 ) }, { 0x1.f4a75991e94ebp+102, 0x1.5d81e52ebb03cp-32, INIT_U128( 0x0000007d29d6647a, 0x53ac000000000000 ) }, { 0x1.d9014a81b202ap+102, 0x1.1d1a5c4c3a34cp-32, INIT_U128( 0x000000764052a06c, 0x80a8000000000000 ) }, { 0x1.d33430cda6686p+103, 0x1.58855d10b10acp-383, INIT_U128( 0x000000e99a1866d3, 0x3430000000000000 ) }, { 0x1.5e801048bd002p+103, 0x1.54a52a72a94a6p-383, INIT_U128( 0x000000af4008245e, 0x8010000000000000 ) }, { 0x1.590a254ab2144p+103, 0x1.0307881c060f1p-383, INIT_U128( 0x000000ac8512a559, 0x0a20000000000000 ) }, { 0x1.6dfaecf0dbf5ep+103, 0x1.54a4b130a9496p-383, INIT_U128( 0x000000b6fd76786d, 0xfaf0000000000000 ) }, { 0x1.011eb1b0023d6p+104, 0x1.39df71da73beep-20, INIT_U128( 0x000001011eb1b002, 0x3d60000000000000 ) }, { 0x1.5ee2142ebdc42p+104, 0x1.43553d9086aa8p-20, INIT_U128( 0x0000015ee2142ebd, 0xc420000000000000 ) }, { 0x1.100502e4200ap+104, 0x1.534d9720a69b3p-20, INIT_U128( 0x000001100502e420, 0x0a00000000000000 ) }, { 0x1.2aefc5ac55df8p+104, 0x1.f553d14beaa7ap-20, INIT_U128( 0x0000012aefc5ac55, 0xdf80000000000000 ) }, { 0x1.d0559891a0ab3p+105, 0x1.87b2239d0f644p-316, INIT_U128( 0x000003a0ab312341, 0x5660000000000000 ) }, { 0x1.0929084e12521p+105, 0x1.e345fe55c68cp-316, INIT_U128( 0x0000021252109c24, 0xa420000000000000 ) }, { 0x1.70c26be4e184ep+105, 0x1.7a6011c6f4c02p-316, INIT_U128( 0x000002e184d7c9c3, 0x09c0000000000000 ) }, { 0x1.8c345d471868cp+105, 0x1.b4a5d903694bbp-316, INIT_U128( 0x0000031868ba8e30, 0xd180000000000000 ) }, { 0x1.66bf48cecd7e9p+106, 0x1.d926e3a9b24dcp-461, INIT_U128( 0x0000059afd233b35, 0xfa40000000000000 ) }, { 0x1.caf9648595f2cp+106, 0x1.3edd8e587dbb2p-461, INIT_U128( 0x0000072be5921657, 0xcb00000000000000 ) }, { 0x1.0ff9c5341ff38p+106, 0x1.5ecf4954bd9e9p-461, INIT_U128( 0x0000043fe714d07f, 0xce00000000000000 ) }, { 0x1.010bbf3602178p+106, 0x1.90183dfb20308p-461, INIT_U128( 0x000004042efcd808, 0x5e00000000000000 ) }, { 0x1.90f1198321e23p+107, 0x1.18ec849e31d9p-508, INIT_U128( 0x00000c8788cc190f, 0x1180000000000000 ) }, { 0x1.88876447110ecp+107, 0x1.3dbc4a967b78ap-508, INIT_U128( 0x00000c443b223888, 0x7600000000000000 ) }, { 0x1.e955d221d2abap+107, 0x1.1f1f0f983e3e2p-508, INIT_U128( 0x00000f4aae910e95, 0x5d00000000000000 ) }, { 0x1.79931aacf3264p+107, 0x1.5c6d47c2b8da9p-508, INIT_U128( 0x00000bcc98d56799, 0x3200000000000000 ) }, { 0x1.49a28e4c93452p+108, 0x1.0819b1c610336p-949, INIT_U128( 0x0000149a28e4c934, 0x5200000000000000 ) }, { 0x1.b61387f56c271p+108, 0x1.fda021a7fb404p-949, INIT_U128( 0x00001b61387f56c2, 0x7100000000000000 ) }, { 0x1.8364b71506c97p+108, 0x1.972f04852e5ep-949, INIT_U128( 0x000018364b71506c, 0x9700000000000000 ) }, { 0x1.a902b10952056p+108, 0x1.aee9cfcf5dd3ap-949, INIT_U128( 0x00001a902b109520, 0x5600000000000000 ) }, { 0x1.d96f1c29b2de4p+109, 0x1.8415bcdf082b8p-695, INIT_U128( 0x00003b2de385365b, 0xc800000000000000 ) }, { 0x1.e8dfe3f9d1bfcp+109, 0x1.c31bb2ed86377p-695, INIT_U128( 0x00003d1bfc7f3a37, 0xf800000000000000 ) }, { 0x1.3a0cc61474199p+109, 0x1.06f2795a0de4fp-695, INIT_U128( 0x0000274198c28e83, 0x3200000000000000 ) }, { 0x1.1f3e5f4a3e7ccp+109, 0x1.d7cc8b85af992p-695, INIT_U128( 0x000023e7cbe947cf, 0x9800000000000000 ) }, { 0x1.dc6af865b8d5fp+110, 0x1.b5d225136ba45p-22, INIT_U128( 0x0000771abe196e35, 0x7c00000000000000 ) }, { 0x1.4ca9fcc69954p+110, 0x1.eaa024f7d5404p-22, INIT_U128( 0x0000532a7f31a655, 0x0000000000000000 ) }, { 0x1.414c72988298ep+110, 0x1.a488753b4910fp-22, INIT_U128( 0x000050531ca620a6, 0x3800000000000000 ) }, { 0x1.dc6b39dbb8d67p+110, 0x1.068d04580d1ap-22, INIT_U128( 0x0000771ace76ee35, 0x9c00000000000000 ) }, { 0x1.74e50e90e9ca2p+111, 0x1.3f289f007e514p-487, INIT_U128( 0x0000ba72874874e5, 0x1000000000000000 ) }, { 0x1.5f0a2632be145p+111, 0x1.f790c8d9ef219p-487, INIT_U128( 0x0000af8513195f0a, 0x2800000000000000 ) }, { 0x1.d422bf03a8458p+111, 0x1.fbacd695f759bp-487, INIT_U128( 0x0000ea115f81d422, 0xc000000000000000 ) }, { 0x1.d9b5cefdb36bap+111, 0x1.c968397b92d07p-487, INIT_U128( 0x0000ecdae77ed9b5, 0xd000000000000000 ) }, { 0x1.f3e78001e7cfp+112, 0x1.4b4970649692ep-744, INIT_U128( 0x0001f3e78001e7cf, 0x0000000000000000 ) }, { 0x1.17c200042f84p+112, 0x1.8d8e8a711b1d1p-744, INIT_U128( 0x000117c200042f84, 0x0000000000000000 ) }, { 0x1.0fe4fde81fcap+112, 0x1.256616f84acc3p-744, INIT_U128( 0x00010fe4fde81fca, 0x0000000000000000 ) }, { 0x1.f2773487e4ee6p+112, 0x1.075dd87a0ebbbp-744, INIT_U128( 0x0001f2773487e4ee, 0x6000000000000000 ) }, { 0x1.7f2646f4fe4c9p+113, 0x1.bde0f7d57bc1fp-552, INIT_U128( 0x0002fe4c8de9fc99, 0x2000000000000000 ) }, { 0x1.552a71c4aa54ep+113, 0x1.5f75cb84beebap-552, INIT_U128( 0x0002aa54e38954a9, 0xc000000000000000 ) }, { 0x1.016211fe02c42p+113, 0x1.755a3ebeeab48p-552, INIT_U128( 0x000202c423fc0588, 0x4000000000000000 ) }, { 0x1.2da4a1405b494p+113, 0x1.c7b5a5b78f6b5p-552, INIT_U128( 0x00025b494280b692, 0x8000000000000000 ) }, { 0x1.454dcac88a9bap+114, 0x1.39e2f64073c5fp-541, INIT_U128( 0x000515372b222a6e, 0x8000000000000000 ) }, { 0x1.f5769ad1eaed4p+114, 0x1.273e2b1a4e7c6p-541, INIT_U128( 0x0007d5da6b47abb5, 0x0000000000000000 ) }, { 0x1.52bf04cca57ep+114, 0x1.2d92613e5b24cp-541, INIT_U128( 0x00054afc133295f8, 0x0000000000000000 ) }, { 0x1.1b84a7fc37095p+114, 0x1.8b3360311666cp-541, INIT_U128( 0x00046e129ff0dc25, 0x4000000000000000 ) }, { 0x1.82ef082b05de1p+115, 0x1.5205f44aa40bep-62, INIT_U128( 0x000c177841582ef0, 0x8000000000000000 ) }, { 0x1.bafcbdf175f98p+115, 0x1.a9ea203153d44p-62, INIT_U128( 0x000dd7e5ef8bafcc, 0x0000000000000000 ) }, { 0x1.64b56bd8c96aep+115, 0x1.42c3a3da85874p-62, INIT_U128( 0x000b25ab5ec64b57, 0x0000000000000000 ) }, { 0x1.55c9b3b6ab936p+115, 0x1.48f9d11a91f3ap-62, INIT_U128( 0x000aae4d9db55c9b, 0x0000000000000000 ) }, { 0x1.5321473ca6429p+116, 0x1.181db1c6303b6p-92, INIT_U128( 0x0015321473ca6429, 0x0000000000000000 ) }, { 0x1.cdc20a3f9b841p+116, 0x1.50077ebca00fp-92, INIT_U128( 0x001cdc20a3f9b841, 0x0000000000000000 ) }, { 0x1.92fee4f925fdcp+116, 0x1.028f8f16051f2p-92, INIT_U128( 0x00192fee4f925fdc, 0x0000000000000000 ) }, { 0x1.1bab55e43756ap+116, 0x1.40855e9c810acp-92, INIT_U128( 0x0011bab55e43756a, 0x0000000000000000 ) }, { 0x1.db43e365b687dp+117, 0x1.41baf8828375fp-732, INIT_U128( 0x003b687c6cb6d0fa, 0x0000000000000000 ) }, { 0x1.a552a1674aa54p+117, 0x1.baa689f9754d1p-732, INIT_U128( 0x0034aa542ce954a8, 0x0000000000000000 ) }, { 0x1.fe56ea4dfcadep+117, 0x1.5684197ead083p-732, INIT_U128( 0x003fcadd49bf95bc, 0x0000000000000000 ) }, { 0x1.6c9b7a08d937p+117, 0x1.2337f65a466ffp-732, INIT_U128( 0x002d936f411b26e0, 0x0000000000000000 ) }, { 0x1.076705de0ecep+118, 0x1.98bce7cb3179dp-844, INIT_U128( 0x0041d9c17783b380, 0x0000000000000000 ) }, { 0x1.9b22f3533645ep+118, 0x1.74f31c32e9e64p-844, INIT_U128( 0x0066c8bcd4cd9178, 0x0000000000000000 ) }, { 0x1.c1d136e583a27p+118, 0x1.767b76ceecf6fp-844, INIT_U128( 0x0070744db960e89c, 0x0000000000000000 ) }, { 0x1.c885934b910b3p+118, 0x1.cd65a24d9acb4p-844, INIT_U128( 0x00722164d2e442cc, 0x0000000000000000 ) }, { 0x1.fb2c8085f659p+119, 0x1.4485cbfc890bap-269, INIT_U128( 0x00fd964042fb2c80, 0x0000000000000000 ) }, { 0x1.78eebbd0f1dd8p+119, 0x1.373c5ea66e78cp-269, INIT_U128( 0x00bc775de878eec0, 0x0000000000000000 ) }, { 0x1.1cbf9dfc397f4p+119, 0x1.3a787bfa74f1p-269, INIT_U128( 0x008e5fcefe1cbfa0, 0x0000000000000000 ) }, { 0x1.0b37d4fc166fap+119, 0x1.3ec2f1ca7d85ep-269, INIT_U128( 0x00859bea7e0b37d0, 0x0000000000000000 ) }, { 0x1.f7d41d9befa83p+119, 0x1.737e360ee6fc7p+45, INIT_U128( 0x00fbea0ecdf7d418, 0x00002e6fc6c1dcdf ) }, { 0x1.5f9adea4bf35cp+119, 0x1.f2a34d73e5469p+45, INIT_U128( 0x00afcd6f525f9ae0, 0x00003e5469ae7ca8 ) }, { 0x1.1625a2842c4b4p+119, 0x1.dffa968fbff53p+45, INIT_U128( 0x008b12d1421625a0, 0x00003bff52d1f7fe ) }, { 0x1.77b9ea5cef73ep+119, 0x1.03d8c57207b18p+45, INIT_U128( 0x00bbdcf52e77b9f0, 0x0000207b18ae40f6 ) }, { 0x1.80c91d3d01924p+119, 0x1.dc2e84abb85dp+45, INIT_U128( 0x00c0648e9e80c920, 0x00003b85d095770b ) }, { 0x1.a13e2abb427c5p+119, 0x1.be5baad37cb75p+45, INIT_U128( 0x00d09f155da13e28, 0x000037cb755a6f96 ) }, { 0x1.3d0a39607a147p+119, 0x1.5d047beeba09p+45, INIT_U128( 0x009e851cb03d0a38, 0x00002ba08f7dd741 ) }, { 0x1.e914f2edd229fp+119, 0x1.a87d6b5150faep+45, INIT_U128( 0x00f48a7976e914f8, 0x0000350fad6a2a1f ) }, { 0x1.1bfba16037f74p+119, 0x1.f1667f23e2cdp+45, INIT_U128( 0x008dfdd0b01bfba0, 0x00003e2ccfe47c59 ) }, { 0x1.e409cc97c8139p+119, 0x1.760ec180ec1d8p+45, INIT_U128( 0x00f204e64be409c8, 0x00002ec1d8301d83 ) }, { 0x1.56095810ac12bp+119, 0x1.fd72c88bfae59p+45, INIT_U128( 0x00ab04ac08560958, 0x00003fae59117f5c ) }, { 0x1.014b8dfe02972p+119, 0x1.5051ec7ca0a3ep+45, INIT_U128( 0x0080a5c6ff014b90, 0x00002a0a3d8f9414 ) }, { 0x1.2c8071285900ep+119, 0x1.2df331a65be66p+45, INIT_U128( 0x00964038942c8070, 0x000025be6634cb7c ) }, { 0x1.ec4edc7bd89dbp+119, 0x1.5689910cad132p+45, INIT_U128( 0x00f6276e3dec4ed8, 0x00002ad1322195a2 ) }, { 0x1.acab22af59564p+120, 0x1.4302395486047p-789, INIT_U128( 0x01acab22af595640, 0x0000000000000000 ) }, { 0x1.6d777264daeeep+120, 0x1.a94793a7528f2p-789, INIT_U128( 0x016d777264daeee0, 0x0000000000000000 ) }, { 0x1.179807f22f301p+120, 0x1.f73f61cbee7ecp-789, INIT_U128( 0x01179807f22f3010, 0x0000000000000000 ) }, { 0x1.2306ea1a460dep+120, 0x1.7f322c14fe646p-789, INIT_U128( 0x012306ea1a460de0, 0x0000000000000000 ) }, { 0x1.4b89313897126p+121, 0x1.24f0cf5649e1ap-97, INIT_U128( 0x02971262712e24c0, 0x0000000000000000 ) }, { 0x1.977d3ba32efa8p+121, 0x1.8d5ae3291ab5cp-97, INIT_U128( 0x032efa77465df500, 0x0000000000000000 ) }, { 0x1.4951cf1a92a3ap+121, 0x1.ff3e4eaffe7cap-97, INIT_U128( 0x0292a39e35254740, 0x0000000000000000 ) }, { 0x1.6487918ac90f2p+121, 0x1.8e5a3b671cb48p-97, INIT_U128( 0x02c90f2315921e40, 0x0000000000000000 ) }, { 0x1.a71b395f4e367p+122, 0x1.4851ea7e90a3ep-824, INIT_U128( 0x069c6ce57d38d9c0, 0x0000000000000000 ) }, { 0x1.58097738b012fp+122, 0x1.a4e92d4749d26p-824, INIT_U128( 0x056025dce2c04bc0, 0x0000000000000000 ) }, { 0x1.431d2f4a863a6p+122, 0x1.ff84386fff087p-824, INIT_U128( 0x050c74bd2a18e980, 0x0000000000000000 ) }, { 0x1.9f1393ad3e272p+122, 0x1.d7c0a6ddaf815p-824, INIT_U128( 0x067c4e4eb4f89c80, 0x0000000000000000 ) }, { 0x1.8983ab7913076p+123, 0x1.fa01bdc9f4037p-825, INIT_U128( 0x0c4c1d5bc8983b00, 0x0000000000000000 ) }, { 0x1.f3551e67e6aa4p+123, 0x1.029c51f00538ap-825, INIT_U128( 0x0f9aa8f33f355200, 0x0000000000000000 ) }, { 0x1.a9da0d1d53b42p+123, 0x1.b5c718d36b8e3p-825, INIT_U128( 0x0d4ed068ea9da100, 0x0000000000000000 ) }, { 0x1.95c79e2b2b8f4p+123, 0x1.384e4c32709cap-825, INIT_U128( 0x0cae3cf1595c7a00, 0x0000000000000000 ) }, { 0x1.73af4650e75e9p+124, 0x1.ec4b7265d896fp-92, INIT_U128( 0x173af4650e75e900, 0x0000000000000000 ) }, { 0x1.5e15a3a0bc2b4p+124, 0x1.2ff859825ff0bp-92, INIT_U128( 0x15e15a3a0bc2b400, 0x0000000000000000 ) }, { 0x1.4dbe24a69b7c4p+124, 0x1.f5b685e5eb6d1p-92, INIT_U128( 0x14dbe24a69b7c400, 0x0000000000000000 ) }, { 0x1.cd65ac439acb6p+124, 0x1.164d910a2c9b2p-92, INIT_U128( 0x1cd65ac439acb600, 0x0000000000000000 ) }, { 0x1.f5bbadd5eb775p+125, 0x1.b16aeddb62d5ep-83, INIT_U128( 0x3eb775babd6eea00, 0x0000000000000000 ) }, { 0x1.b66841396cd08p+125, 0x1.f9957d69f32afp-83, INIT_U128( 0x36cd08272d9a1000, 0x0000000000000000 ) }, { 0x1.05be50760b7cap+125, 0x1.f9ebf8ddf3d7fp-83, INIT_U128( 0x20b7ca0ec16f9400, 0x0000000000000000 ) }, { 0x1.51312262a2624p+125, 0x1.11c69084238d2p-83, INIT_U128( 0x2a26244c544c4800, 0x0000000000000000 ) }, { 0x1.30eab12c61d56p+126, 0x1.f1e0e851e3c1dp-773, INIT_U128( 0x4c3aac4b18755800, 0x0000000000000000 ) }, { 0x1.ac34bcf158698p+126, 0x1.a55b126f4ab62p-773, INIT_U128( 0x6b0d2f3c561a6000, 0x0000000000000000 ) }, { 0x1.02246a040448ep+126, 0x1.61a83652c3507p-773, INIT_U128( 0x40891a8101123800, 0x0000000000000000 ) }, { 0x1.ae881f955d104p+126, 0x1.c694aaa18d296p-773, INIT_U128( 0x6ba207e557441000, 0x0000000000000000 ) }, { 0x1.08016b641002ep+127, 0x1.23a890d047512p-406, INIT_U128( 0x8400b5b208017000, 0x0000000000000000 ) }, { 0x1.3d90e7327b21dp+127, 0x1.0aa664c0154ccp-406, INIT_U128( 0x9ec873993d90e800, 0x0000000000000000 ) }, { 0x1.ff931617ff263p+127, 0x1.47d5e2a08fabcp-406, INIT_U128( 0xffc98b0bff931800, 0x0000000000000000 ) }, { 0x1.f565d1dfeacbap+127, 0x1.827bc0c304f78p-406, INIT_U128( 0xfab2e8eff565d000, 0x0000000000000000 ) }, { 0x1.fe1985fbfc33p+128, 0x1.a6e724cd4dce4p-1021, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.54709ed6a8e14p+128, 0x1.74a32d1ce9466p-1021, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.a8407dcf5081p+128, 0x1.ffb065f3ff60cp-1021, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.7a1cfcf2f43ap+130, 0x1.84bb5ea30976cp-548, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.6bddaae8d7bb6p+194, 0x1.de64c609bcc99p-754, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.5c6c29d4b8d85p+146, 0x1.0644f6d60c89fp-345, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.c6ce8bcf8d9d2p+158, 0x1.443b2e7088766p-26, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.747f6aa0e8feep+168, 0x1.fe663ae9fccc8p-143, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.26ee550a4ddcap+173, 0x1.951f708f2a3eep-45, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.3ecfe0ea7d9fcp+189, 0x1.9cb53593396a7p-619, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.9d394a313a729p+190, 0x1.9ecfff853dap-150, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.244a568a4894bp+241, 0x1.e23f42d7c47e9p-956, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.b564bb276ac98p+398, 0x1.7af8d1ccf5f1ap+215, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.ee06b389dc0d7p+468, 0x1.b54fa74f6a9f5p+322, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.ac0045bd58009p+588, 0x1.ba99775b7532fp-365, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.692078cad240fp+661, 0x1.bc4a88a978951p+356, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.be1e09dd7c3c1p+765, 0x1.428bc5dc85178p-848, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.5f5554c4beaaap+853, 0x1.a9e23bdd53c48p-807, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.748e96ace91d3p+993, 0x1.ab54ab4b56a96p-22, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { 0x1.0629e7380c53dp+1023, 0x1.c0b4b15581696p+323, INIT_U128( 0xffffffffffffffff, 0xffffffffffffffff ) }, { INFINITY, 0x1.21bff4bc437fep-333, ((__uint128_t) 0xffffffffffffffff << 64) | 0xffffffffffffffff }, { INFINITY, 0x1.47e9a0228fd34p-333, ((__uint128_t) 0xffffffffffffffff << 64) | 0xffffffffffffffff } }; static const int numTests = sizeof(testList) / sizeof(struct testCase);
777d00243770c49ff940e9a893dc9a486fa40946
52c8ed39b32ccc7c0673278c1adea3638797c9ff
/src/framework/core/l-vision.c
b07f164ac7f0b09ca695d6529eaac4b1a42ebc71
[ "MIT" ]
permissive
xboot/xboot
0cab7b440b612aa0a4c366025598a53a7ec3adf1
6d6b93947b7fcb8c3924fedb0715c23877eedd5e
refs/heads/master
2023-08-20T05:56:25.149388
2023-07-12T07:38:29
2023-07-12T07:38:29
471,539
765
296
MIT
2023-05-25T09:39:01
2010-01-14T08:25:12
C
UTF-8
C
false
false
10,478
c
l-vision.c
/* * framework/core/l-vision.c * * Copyright(c) 2007-2023 Jianjun Jiang <8192542@qq.com> * Official site: http://xboot.org * Mobile phone: +86-18665388956 * QQ: 8192542 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * */ #include <xboot.h> #include <vision/vision.h> #include <core/l-image.h> #include <core/l-vision.h> static int l_vision_new(lua_State * L) { struct vision_t * v = NULL; if(luaL_testudata(L, 1, MT_IMAGE)) { struct limage_t * img = lua_touserdata(L, 1); v = vision_alloc(VISION_TYPE_RGB, surface_get_width(img->s), surface_get_height(img->s)); if(v) vision_apply_surface(v, img->s); } else { if(lua_gettop(L) >= 2) { int width = luaL_checkinteger(L, 1); int height = luaL_checkinteger(L, 2); enum vision_type_t type = VISION_TYPE_RGB; switch(shash(luaL_optstring(L, 3, NULL))) { case 0x7c977c78: /* "gray" */ type = VISION_TYPE_GRAY; break; case 0x0b88a580: /* "rgb" */ type = VISION_TYPE_RGB; break; case 0x0b887c96: /* "hsv" */ type = VISION_TYPE_HSV; break; default: break; } v = vision_alloc(type, width, height); } } if(v) { struct lvision_t * vision = lua_newuserdata(L, sizeof(struct lvision_t)); vision->v = v; luaL_setmetatable(L, MT_VISION); return 1; } return 0; } static const luaL_Reg l_vision[] = { {"new", l_vision_new}, {NULL, NULL} }; static int m_vision_gc(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); vision_free(vision->v); return 0; } static int m_vision_tostring(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); struct vision_t * v = vision->v; enum vision_type_t type = vision_get_type(v); int width = vision_get_width(v); int height = vision_get_height(v); void * datas = vision_get_datas(v); const char * typestr; switch(type) { case VISION_TYPE_GRAY: typestr = "gray"; break; case VISION_TYPE_RGB: typestr = "rgb"; break; case VISION_TYPE_HSV: typestr = "hsv"; break; default: typestr = "rgb"; break; } lua_pushfstring(L, "vision(%s,%d,%d,%p)", typestr, width, height, datas); return 1; } static int m_vision_get_type(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); switch(vision_get_type(vision->v)) { case VISION_TYPE_GRAY: lua_pushstring(L, "gray"); break; case VISION_TYPE_RGB: lua_pushstring(L, "rgb"); break; case VISION_TYPE_HSV: lua_pushstring(L, "hsv"); break; default: lua_pushnil(L); break; } return 1; } static int m_vision_get_type_bytes(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); lua_pushnumber(L, vision_type_get_bytes(vision->v->type)); return 1; } static int m_vision_get_type_channels(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); lua_pushnumber(L, vision_type_get_channels(vision->v->type)); return 1; } static int m_vision_get_width(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); lua_pushnumber(L, vision_get_width(vision->v)); return 1; } static int m_vision_get_height(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); lua_pushnumber(L, vision_get_height(vision->v)); return 1; } static int m_vision_get_size(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); lua_pushnumber(L, vision_get_width(vision->v)); lua_pushnumber(L, vision_get_height(vision->v)); return 2; } static int m_vision_clone(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); int x = luaL_optinteger(L, 2, 0); int y = luaL_optinteger(L, 3, 0); int w = luaL_optinteger(L, 4, 0); int h = luaL_optinteger(L, 5, 0); struct vision_t * o = vision_clone(vision->v, x, y, w, h); if(!o) return 0; struct lvision_t * subvision = lua_newuserdata(L, sizeof(struct lvision_t)); subvision->v = o; luaL_setmetatable(L, MT_VISION); return 1; } static int m_vision_inrange(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); float l[3], h[3]; if(lua_gettop(L) == 3) { if(lua_istable(L, 2) && (lua_rawlen(L, 2) == 3) && lua_istable(L, 3) && (lua_rawlen(L, 3) == 3)) { lua_rawgeti(L, 2, 1); l[0] = lua_tonumber(L, -1); lua_pop(L, 1); lua_rawgeti(L, 2, 2); l[1] = lua_tonumber(L, -1); lua_pop(L, 1); lua_rawgeti(L, 2, 3); l[2] = lua_tonumber(L, -1); lua_pop(L, 1); lua_rawgeti(L, 3, 1); h[0] = lua_tonumber(L, -1); lua_pop(L, 1); lua_rawgeti(L, 3, 2); h[1] = lua_tonumber(L, -1); lua_pop(L, 1); lua_rawgeti(L, 3, 3); h[2] = lua_tonumber(L, -1); lua_pop(L, 1); struct vision_t * o = vision_inrange(vision->v, l, h); if(o) { struct lvision_t * mask = lua_newuserdata(L, sizeof(struct lvision_t)); mask->v = o; luaL_setmetatable(L, MT_VISION); return 1; } } } return 0; } static int m_vision_convert(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); enum vision_type_t type = VISION_TYPE_RGB; switch(shash(luaL_optstring(L, 2, NULL))) { case 0x7c977c78: /* "gray" */ type = VISION_TYPE_GRAY; break; case 0x0b88a580: /* "rgb" */ type = VISION_TYPE_RGB; break; case 0x0b887c96: /* "hsv" */ type = VISION_TYPE_HSV; break; default: break; } vision_convert(vision->v, type); lua_settop(L, 1); return 1; } static int m_vision_apply(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); struct limage_t * img = luaL_checkudata(L, 2, MT_IMAGE); vision_apply_surface(vision->v, img->s); lua_settop(L, 1); return 1; } static int m_vision_bitwise(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); switch(shash(luaL_optstring(L, 2, NULL))) { case 0x0b885e18: /* "and" */ { struct lvision_t * o = luaL_checkudata(L, 3, MT_VISION); vision_bitwise_and(vision->v, o->v); } break; case 0x00597906: /* "or" */ { struct lvision_t * o = luaL_checkudata(L, 3, MT_VISION); vision_bitwise_or(vision->v, o->v); } break; case 0x0b88c01e: /* "xor" */ { struct lvision_t * o = luaL_checkudata(L, 3, MT_VISION); vision_bitwise_xor(vision->v, o->v); } break; case 0x0b889596: /* "not" */ vision_bitwise_not(vision->v); break; default: break; } lua_settop(L, 1); return 1; } static int m_vision_gray(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); vision_gray(vision->v); lua_settop(L, 1); return 1; } static int m_vision_sepia(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); vision_sepia(vision->v); lua_settop(L, 1); return 1; } static int m_vision_invert(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); vision_invert(vision->v); lua_settop(L, 1); return 1; } static int m_vision_dither(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); vision_dither(vision->v); lua_settop(L, 1); return 1; } static int m_vision_threshold(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); int threshold = luaL_optinteger(L, 2, -1); const char * type = luaL_optstring(L, 3, "binary"); vision_threshold(vision->v, threshold, type); lua_settop(L, 1); return 1; } static int m_vision_colormap(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); const char * type = luaL_optstring(L, 2, "parula"); vision_colormap(vision->v, type); lua_settop(L, 1); return 1; } static int m_vision_gamma(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); float gamma = luaL_optnumber(L, 2, 1.0); vision_gamma(vision->v, gamma); lua_settop(L, 1); return 1; } static int m_vision_erode(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); int times = luaL_optinteger(L, 2, 1); vision_erode(vision->v, times); lua_settop(L, 1); return 1; } static int m_vision_dilate(lua_State * L) { struct lvision_t * vision = luaL_checkudata(L, 1, MT_VISION); int times = luaL_optinteger(L, 2, 1); vision_dilate(vision->v, times); lua_settop(L, 1); return 1; } static const luaL_Reg m_vision[] = { {"__gc", m_vision_gc}, {"__tostring", m_vision_tostring}, {"getType", m_vision_get_type}, {"getTypeBytes", m_vision_get_type_bytes}, {"getTypeChannels", m_vision_get_type_channels}, {"getWidth", m_vision_get_width}, {"getHeight", m_vision_get_height}, {"getSize", m_vision_get_size}, {"clone", m_vision_clone}, {"inrange", m_vision_inrange}, {"convert", m_vision_convert}, {"apply", m_vision_apply}, {"bitwise", m_vision_bitwise}, {"gray", m_vision_gray}, {"sepia", m_vision_sepia}, {"invert", m_vision_invert}, {"dither", m_vision_dither}, {"threshold", m_vision_threshold}, {"colormap", m_vision_colormap}, {"gamma", m_vision_gamma}, {"erode", m_vision_erode}, {"dilate", m_vision_dilate}, {NULL, NULL} }; int luaopen_vision(lua_State * L) { luaL_newlib(L, l_vision); luahelper_create_metatable(L, MT_VISION, m_vision); return 1; }
2056945a6c70a42933bc91f46f07ca8bbf2f9086
0c4a079b5ac2fc627b91b48f4bcf6faa804d5a28
/third_party/wavpack/src/pack_dns.c
2c6f3c8f13dda4832894bff3bcd0c22885a7d2b0
[ "LGPL-2.0-or-later", "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-synthesis-toolkit", "LicenseRef-scancode-public-domain" ]
permissive
ddiakopoulos/libnyquist
37eb768bcf31cb310c710ee43c76d33baa823282
767efd97cdd7a281d193296586e708490eb6e54f
refs/heads/master
2023-08-18T04:43:21.137134
2023-02-13T07:54:10
2023-02-13T07:54:10
32,698,321
515
77
BSD-2-Clause
2022-09-25T20:29:39
2015-03-22T22:15:11
C++
UTF-8
C
false
false
7,674
c
pack_dns.c
//////////////////////////////////////////////////////////////////////////// // **** WAVPACK **** // // Hybrid Lossless Wavefile Compressor // // Copyright (c) 1998 - 2013 Conifer Software. // // All Rights Reserved. // // Distributed under the BSD Software License (see license.txt) // //////////////////////////////////////////////////////////////////////////// // pack_dns.c // This module handles the implementation of "dynamic noise shaping" which is // designed to move the spectrum of the quantization noise introduced by lossy // compression up or down in frequency so that it is more likely to be masked // by the source material. #include <stdlib.h> #include <string.h> #include <math.h> #include "wavpack_local.h" static void best_floating_line (short *values, int num_values, double *initial_y, double *final_y, short *max_error); void dynamic_noise_shaping (WavpackContext *wpc, int32_t *buffer, int shortening_allowed) { WavpackStream *wps = wpc->streams [wpc->current_stream]; int32_t sample_count = wps->wphdr.block_samples; struct decorr_pass *ap = &wps->analysis_pass; uint32_t flags = wps->wphdr.flags; int32_t *bptr, temp, sam; short *swptr; int sc; if (!wps->num_terms && sample_count > 8) { if (flags & MONO_DATA) for (bptr = buffer + sample_count - 3, sc = sample_count - 2; sc--;) { sam = (3 * bptr [1] - bptr [2]) >> 1; temp = *bptr-- - apply_weight (ap->weight_A, sam); update_weight (ap->weight_A, 2, sam, temp); } else for (bptr = buffer + (sample_count - 3) * 2 + 1, sc = sample_count - 2; sc--;) { sam = (3 * bptr [2] - bptr [4]) >> 1; temp = *bptr-- - apply_weight (ap->weight_B, sam); update_weight (ap->weight_B, 2, sam, temp); sam = (3 * bptr [2] - bptr [4]) >> 1; temp = *bptr-- - apply_weight (ap->weight_A, sam); update_weight (ap->weight_A, 2, sam, temp); } } if (sample_count > wps->dc.shaping_samples) { sc = sample_count - wps->dc.shaping_samples; swptr = wps->dc.shaping_data + wps->dc.shaping_samples; bptr = buffer + wps->dc.shaping_samples * ((flags & MONO_DATA) ? 1 : 2); if (flags & MONO_DATA) while (sc--) { sam = (3 * ap->samples_A [0] - ap->samples_A [1]) >> 1; temp = *bptr - apply_weight (ap->weight_A, sam); update_weight (ap->weight_A, 2, sam, temp); ap->samples_A [1] = ap->samples_A [0]; ap->samples_A [0] = *bptr++; *swptr++ = (ap->weight_A < 256) ? 1024 : 1536 - ap->weight_A * 2; } else while (sc--) { sam = (3 * ap->samples_A [0] - ap->samples_A [1]) >> 1; temp = *bptr - apply_weight (ap->weight_A, sam); update_weight (ap->weight_A, 2, sam, temp); ap->samples_A [1] = ap->samples_A [0]; ap->samples_A [0] = *bptr++; sam = (3 * ap->samples_B [0] - ap->samples_B [1]) >> 1; temp = *bptr - apply_weight (ap->weight_B, sam); update_weight (ap->weight_B, 2, sam, temp); ap->samples_B [1] = ap->samples_B [0]; ap->samples_B [0] = *bptr++; *swptr++ = (ap->weight_A + ap->weight_B < 512) ? 1024 : 1536 - ap->weight_A - ap->weight_B; } wps->dc.shaping_samples = sample_count; } if (wpc->wvc_flag) { int max_allowed_error = 1000000 / wpc->ave_block_samples; short max_error, trial_max_error; double initial_y, final_y; if (max_allowed_error < 128) max_allowed_error = 128; best_floating_line (wps->dc.shaping_data, sample_count, &initial_y, &final_y, &max_error); if (shortening_allowed && max_error > max_allowed_error) { int min_samples = 0, max_samples = sample_count, trial_count; double trial_initial_y, trial_final_y; while (1) { trial_count = (min_samples + max_samples) / 2; best_floating_line (wps->dc.shaping_data, trial_count, &trial_initial_y, &trial_final_y, &trial_max_error); if (trial_max_error < max_allowed_error) { max_error = trial_max_error; min_samples = trial_count; initial_y = trial_initial_y; final_y = trial_final_y; } else max_samples = trial_count; if (min_samples > 10000 || max_samples - min_samples < 2) break; } sample_count = min_samples; } if (initial_y < -512) initial_y = -512; else if (initial_y > 1024) initial_y = 1024; if (final_y < -512) final_y = -512; else if (final_y > 1024) final_y = 1024; #if 0 error_line ("%.2f sec, sample count = %5d, max error = %3d, range = %5d, %5d, actual = %5d, %5d", (double) wps->sample_index / wpc->config.sample_rate, sample_count, max_error, (int) floor (initial_y), (int) floor (final_y), wps->dc.shaping_data [0], wps->dc.shaping_data [sample_count-1]); #endif if (sample_count != wps->wphdr.block_samples) wps->wphdr.block_samples = sample_count; if (wpc->wvc_flag) { wps->dc.shaping_acc [0] = wps->dc.shaping_acc [1] = (int32_t) floor (initial_y * 65536.0 + 0.5); wps->dc.shaping_delta [0] = wps->dc.shaping_delta [1] = (int32_t) floor ((final_y - initial_y) / (sample_count - 1) * 65536.0 + 0.5); wps->dc.shaping_array = NULL; } else wps->dc.shaping_array = wps->dc.shaping_data; } else wps->dc.shaping_array = wps->dc.shaping_data; } // Given an array of integer data (in shorts), find the linear function that most closely // represents it (based on minimum sum of absolute errors). This is returned as the double // precision initial & final Y values of the best-fit line. The function can also optionally // compute and return a maximum error value (as a short). Note that the ends of the resulting // line may fall way outside the range of input values, so some sort of clipping may be // needed. static void best_floating_line (short *values, int num_values, double *initial_y, double *final_y, short *max_error) { double left_sum = 0.0, right_sum = 0.0, center_x = (num_values - 1) / 2.0, center_y, m; int i; for (i = 0; i < num_values >> 1; ++i) { right_sum += values [num_values - i - 1]; left_sum += values [i]; } if (num_values & 1) { right_sum += values [num_values >> 1] * 0.5; left_sum += values [num_values >> 1] * 0.5; } center_y = (right_sum + left_sum) / num_values; m = (right_sum - left_sum) / ((double) num_values * num_values) * 4.0; if (initial_y) *initial_y = center_y - m * center_x; if (final_y) *final_y = center_y + m * center_x; if (max_error) { double max = 0.0; for (i = 0; i < num_values; ++i) if (fabs (values [i] - (center_y + (i - center_x) * m)) > max) max = fabs (values [i] - (center_y + (i - center_x) * m)); *max_error = (short) floor (max + 0.5); } }
14b8e938ab74b894ddb42df5d2ccbcf0a4b9d08a
05793671a0248b774e28902a542d9974c352764b
/x11-packages/kitty/reallocarray.c
c99eda7fc349718318827c579f60a02405a60ab6
[ "Apache-2.0" ]
permissive
termux/termux-packages
6ed565e7f8769adc02d865335721c2e41ccacf44
7c190ce8ccd093afd94d07dea77274790d59b5ca
refs/heads/master
2023-09-01T13:56:43.985055
2023-09-01T12:14:09
2023-09-01T12:14:09
37,346,186
12,687
3,938
NOASSERTION
2023-09-14T19:35:17
2015-06-12T21:48:33
Shell
UTF-8
C
false
false
323
c
reallocarray.c
#if defined __ANDROID__ && __ANDROID_API__ < 29 #include <stdlib.h> #include <errno.h> static void * reallocarray(void *ptr, size_t nmemb, size_t size) { size_t res; if (__builtin_mul_overflow(nmemb, size, &res)) { errno = ENOMEM; return NULL; } return realloc(ptr, nmemb * size); } #endif
7c9e94b2822902c94516cbebb5eb9a6e80221697
34cfb15a219a735d58fcaadfb71ef1606a9114dc
/ext/include/swow_closure.h
c8388241171370739fcedfce1333bf7fcb5335fe
[ "Apache-2.0", "ISC", "BSL-1.0", "MIT", "BSD-2-Clause" ]
permissive
swow/swow
e32007f3cf1c8daf4accd7d64f9b2b728f5ab103
231f580dd1ee84d0364f314387073c5bda9854d2
refs/heads/develop
2023-08-19T13:51:39.840737
2023-08-05T01:51:04
2023-08-05T03:13:03
295,651,066
1,085
117
Apache-2.0
2023-06-15T09:18:12
2020-09-15T07:37:43
C
UTF-8
C
false
false
3,362
h
swow_closure.h
/* +--------------------------------------------------------------------------+ | Swow | +--------------------------------------------------------------------------+ | Licensed under the Apache License, Version 2.0 (the "License"); | | you may not use this file except in compliance with the License. | | You may obtain a copy of the License at | | http://www.apache.org/licenses/LICENSE-2.0 | | Unless required by applicable law or agreed to in writing, software | | distributed under the License is distributed on an "AS IS" BASIS, | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | | See the License for the specific language governing permissions and | | limitations under the License. See accompanying LICENSE file. | +--------------------------------------------------------------------------+ | Author: Twosee <twosee@php.net> | | dixyes <dixyes@gmail.com> | +--------------------------------------------------------------------------+ */ #ifndef SWOW_CLOSURE_H #define SWOW_CLOSURE_H #ifdef __cplusplus extern "C" { #endif #include "swow.h" /* globals */ CAT_GLOBALS_STRUCT_BEGIN(swow_closure) { zend_object *current_object; } CAT_GLOBALS_STRUCT_END(swow_closure); extern SWOW_API CAT_GLOBALS_DECLARE(swow_closure); #define SWOW_CLOSURE_G(x) CAT_GLOBALS_GET(swow_closure, x) /* helper functions */ static zend_always_inline bool swow_object_is_closure(zend_object *object) { return instanceof_function(object->ce, zend_ce_closure); } static zend_always_inline bool swow_zval_is_closure(zval *z_value) { return Z_TYPE_P(z_value) == IS_OBJECT && swow_object_is_closure(Z_OBJ_P(z_value)); } static zend_always_inline bool swow_function_is_anonymous(const zend_function *function) { return (function->common.fn_flags & (ZEND_ACC_CLOSURE | ZEND_ACC_FAKE_CLOSURE)) == ZEND_ACC_CLOSURE; } static zend_always_inline bool swow_function_is_user_anonymous(const zend_function *function) { return function->type == ZEND_USER_FUNCTION && swow_function_is_anonymous(function); } static zend_always_inline bool swow_function_is_named(const zend_function *function) { return function->common.function_name != NULL && !swow_function_is_anonymous(function); } static zend_always_inline const char *swow_function_get_namespace_name(const zend_function *function, size_t *length) { zend_string *name = function->common.function_name; const char *backslash = (const char *) zend_memrchr(ZSTR_VAL(name), '\\', ZSTR_LEN(name)); if (backslash && backslash > ZSTR_VAL(name)) { *length = backslash - ZSTR_VAL(name); return ZSTR_VAL(name); } else { *length = 0; return NULL; } } /* loader */ zend_result swow_closure_module_init(INIT_FUNC_ARGS); zend_result swow_closure_module_shutdown(INIT_FUNC_ARGS); /* APIs */ SWOW_API SWOW_MAY_THROW HashTable *swow_serialize_user_anonymous_function(zend_function *function); SWOW_API SWOW_MAY_THROW HashTable *swow_serialize_named_function(zend_function *function); #ifdef __cplusplus } #endif #endif /* SWOW_CLOSURE_H */
c5ead18569dca471d2633ecd74424905c66be856
a5a99f646e371b45974a6fb6ccc06b0a674818f2
/MuonAnalysis/MomentumScaleCalibration/test/Macros/Smoother.C
dae0722206a3c31ef72b6195d522df74e7b9c3ed
[ "Apache-2.0" ]
permissive
cms-sw/cmssw
4ecd2c1105d59c66d385551230542c6615b9ab58
19c178740257eb48367778593da55dcad08b7a4f
refs/heads/master
2023-08-23T21:57:42.491143
2023-08-22T20:22:40
2023-08-22T20:22:40
10,969,551
1,006
3,696
Apache-2.0
2023-09-14T19:14:28
2013-06-26T14:09:07
C++
UTF-8
C
false
false
5,230
c
Smoother.C
#include <iostream> #include "TH1F.h" #include "TString.h" /** * This class receives a TH1 histogram and applies a smoothing. * The smoothing can be done in two ways: * - with the applySmooth method: * -- for each bin take the two bins on the left and the right * -- compute the average of the sidepoints and compare with the middle * -- if the difference is more than N% (configurable) replace the point with the average * - with the applySmoothSingle method: * -- the same but using only the closest bin on left and right. */ class Smoother { public: Smoother( const int N = 0.5 ) : ratio_(N) {} TH1F * smooth( TH1F * histo, const int iterations, const bool * single, const double & newHistoXmin = 71.1876, const double & newHistoXmax = 111.1876, const int newHistoBins = 1001 ); protected: TH1F * applySmooth( TH1F * histo, const double & newHistoXmin, const double & newHistoXmax, const int newHistoBins ); TH1F * applySmoothSingle( TH1F * histo, const double & newHistoXmin, const double & newHistoXmax, const int newHistoBins ); int ratio_; }; TH1F * Smoother::applySmooth( TH1F * histo, const double & newHistoXmin, const double & newHistoXmax, const int newHistoBins ) { TH1F * smoothedHisto = (TH1F*)histo->Clone(); smoothedHisto->Reset(); histo->SetAxisRange(newHistoXmin, newHistoXmax); int xBinMin = histo->FindBin(newHistoXmin); int xBinMax = histo->FindBin(newHistoXmax); std::cout << "xBinMin = " << xBinMin << std::endl; std::cout << "xBinMax = " << xBinMax << std::endl; double xMin = histo->GetXaxis()->GetXmin(); double xMax = histo->GetXaxis()->GetXmax(); int nBins = histo->GetNbinsX(); std::cout << "xMin = " << xMin << std::endl; std::cout << "xMax = " << xMax << std::endl; std::cout << "nBins = " << nBins << std::endl; // Start from the third bin up to the second to last bin int smoothedBin = 2; smoothedHisto->SetBinContent(0, histo->GetBinContent(0)); smoothedHisto->SetBinContent(1, histo->GetBinContent(1)); for( int i=2+xBinMin; i<xBinMax-2; ++i, ++smoothedBin ) { double min2 = histo->GetBinContent(i-2); double min1 = histo->GetBinContent(i-1); double med = histo->GetBinContent(i); double plus1 = histo->GetBinContent(i+1); double plus2 = histo->GetBinContent(i+2); // If the slope is the same before and after (med is not a min/max) if( (min1 - min2)*(plus2 - plus1) > 0 ) { // compare the med with the mean of the four points double newMed = ((min1+min2+plus1+plus2)/4); if( fabs(med/newMed - 1) > ratio_ ) { std::cout << "Replacing value for bin " << i << " from " << med << " to " << newMed << std::endl; // smoothedHisto->SetBinContent(smoothedBin, newMed); smoothedHisto->SetBinContent(i, newMed); continue; } } // smoothedHisto->SetBinContent(smoothedBin, med); smoothedHisto->SetBinContent(i, med); std::cout << "bin["<<i<<"] = " << histo->GetBinContent(i) << std::endl; } return smoothedHisto; } TH1F * Smoother::applySmoothSingle( TH1F * histo, const double & newHistoXmin, const double & newHistoXmax, const int newHistoBins ) { TH1F * smoothedHisto = (TH1F*)histo->Clone(); smoothedHisto->Reset(); histo->SetAxisRange(newHistoXmin, newHistoXmax); int xBinMin = histo->FindBin(newHistoXmin); int xBinMax = histo->FindBin(newHistoXmax); std::cout << "xBinMin = " << xBinMin << std::endl; std::cout << "xBinMax = " << xBinMax << std::endl; double xMin = histo->GetXaxis()->GetXmin(); double xMax = histo->GetXaxis()->GetXmax(); int nBins = histo->GetNbinsX(); std::cout << "xMin = " << xMin << std::endl; std::cout << "xMax = " << xMax << std::endl; std::cout << "nBins = " << nBins << std::endl; // Start from the third bin up to the second to last bin int smoothedBin = 2; smoothedHisto->SetBinContent(0, histo->GetBinContent(0)); smoothedHisto->SetBinContent(1, histo->GetBinContent(1)); for( int i=2+xBinMin; i<xBinMax-2; ++i, ++smoothedBin ) { double min1 = histo->GetBinContent(i-1); double med = histo->GetBinContent(i); double plus1 = histo->GetBinContent(i+1); // compare the med with the mean of the four points double newMed = ((min1+plus1)/2); if( fabs(med/newMed - 1) > ratio_ ) { std::cout << "Replacing value for bin " << i << " from " << med << " to " << newMed << std::endl; smoothedHisto->SetBinContent(i, newMed); continue; } smoothedHisto->SetBinContent(i, med); std::cout << "bin["<<i<<"] = " << histo->GetBinContent(i) << std::endl; } return smoothedHisto; } TH1F * Smoother::smooth( TH1F * histo, const int iterations, const bool * single, const double & newHistoXmin, const double & newHistoXmax, const int newHistoBins ) { histo->Draw(); TH1F * smoothedHisto = histo; for( int i=0; i<iterations; ++i ) { if( single[i] ) { smoothedHisto = applySmoothSingle(smoothedHisto, newHistoXmin, newHistoXmax, newHistoBins); } else { smoothedHisto = applySmooth(smoothedHisto, newHistoXmin, newHistoXmax, newHistoBins); } // smoothedHisto->Draw("same"); // smoothedHisto->SetLineColor(2+i); } smoothedHisto->Draw("same"); smoothedHisto->SetLineColor(kRed); return smoothedHisto; }
e2f6bc71ee3eaec2e01e57bfce640168f37c100e
e1d9c54e9925e30e388a255b53a93cccad0b94cb
/kubernetes/model/v1_resource_requirements.h
eeb17bf229977db2aa30075fec11c9589fe6c1a6
[ "curl", "Apache-2.0" ]
permissive
kubernetes-client/c
dd4fd8095485c083e0f40f2b48159b1609a6141b
5ac5ff25e9809a92a48111b1f77574b6d040b711
refs/heads/master
2023-08-13T10:51:03.702497
2023-08-07T19:18:32
2023-08-07T19:18:32
247,958,425
127
47
Apache-2.0
2023-09-07T20:07:00
2020-03-17T11:59:05
C
UTF-8
C
false
false
1,082
h
v1_resource_requirements.h
/* * v1_resource_requirements.h * * ResourceRequirements describes the compute resource requirements. */ #ifndef _v1_resource_requirements_H_ #define _v1_resource_requirements_H_ #include <string.h> #include "../external/cJSON.h" #include "../include/list.h" #include "../include/keyValuePair.h" #include "../include/binary.h" typedef struct v1_resource_requirements_t v1_resource_requirements_t; #include "v1_resource_claim.h" typedef struct v1_resource_requirements_t { list_t *claims; //nonprimitive container list_t* limits; //map list_t* requests; //map } v1_resource_requirements_t; v1_resource_requirements_t *v1_resource_requirements_create( list_t *claims, list_t* limits, list_t* requests ); void v1_resource_requirements_free(v1_resource_requirements_t *v1_resource_requirements); v1_resource_requirements_t *v1_resource_requirements_parseFromJSON(cJSON *v1_resource_requirementsJSON); cJSON *v1_resource_requirements_convertToJSON(v1_resource_requirements_t *v1_resource_requirements); #endif /* _v1_resource_requirements_H_ */
f43509de391e26cb3e1f630d94187267277cd07b
533d5e1a40def1e1118895f6ba2b4d503c918d1a
/tools/BORLANDC/OWL/EXAMPLES/MDITEST.H
9a7affab3363603706a78db29618ffe296519be4
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
gandrewstone/GameMaker
415cccdf0f9ecf5f339b7551469f07d53e43a6fd
1fe0070a9f8412b5b53923aae7e64769722685a3
refs/heads/master
2020-06-12T19:30:07.252432
2014-07-14T14:38:55
2014-07-14T14:38:55
21,754,773
103
23
null
null
null
null
UTF-8
C
false
false
135
h
MDITEST.H
// ObjectWindows - (C) Copyright 1992 by Borland International #define CM_COUNTCHILDREN 201 #define ID_CLOSEBOX 101 
13430914bd21b29d34756b6bdcd111bedb6709ff
a8194cf6ffd12f7551eaba53572744080a0bfef3
/test/common/lib/ut_multithread.c
818b8438c53b71298cb77988c33ac058636739b6
[ "Intel", "BSD-2-Clause", "BSD-3-Clause" ]
permissive
spdk/spdk
51294f67104b8c3d18f19147d63a212e9486c687
d62a3810364cb87be352c66acf7c7f968508ca17
refs/heads/master
2023-08-08T16:07:41.263000
2023-08-02T09:06:56
2023-08-08T07:01:20
39,042,157
2,708
1,158
NOASSERTION
2023-08-11T09:50:50
2015-07-13T23:15:15
C
UTF-8
C
false
false
3,574
c
ut_multithread.c
/* SPDX-License-Identifier: BSD-3-Clause * Copyright (C) 2017 Intel Corporation. * All rights reserved. */ #include "spdk_internal/cunit.h" #include "spdk/thread.h" #include "spdk_internal/mock.h" #include "common/lib/test_env.c" static uint32_t g_ut_num_threads; int allocate_threads(int num_threads); void free_threads(void); void poll_threads(void); bool poll_thread(uintptr_t thread_id); bool poll_thread_times(uintptr_t thread_id, uint32_t max_polls); struct ut_msg { spdk_msg_fn fn; void *ctx; TAILQ_ENTRY(ut_msg) link; }; struct ut_thread { struct spdk_thread *thread; struct spdk_io_channel *ch; }; struct ut_thread *g_ut_threads; #define INVALID_THREAD 0x1000 static uint64_t g_ut_thread_id = INVALID_THREAD; static void set_thread(uintptr_t thread_id) { g_ut_thread_id = thread_id; if (thread_id == INVALID_THREAD) { spdk_set_thread(NULL); } else { spdk_set_thread(g_ut_threads[thread_id].thread); } } int allocate_threads(int num_threads) { struct spdk_thread *thread; uint32_t i; spdk_thread_lib_init(NULL, 0); g_ut_num_threads = num_threads; g_ut_threads = calloc(num_threads, sizeof(*g_ut_threads)); assert(g_ut_threads != NULL); for (i = 0; i < g_ut_num_threads; i++) { set_thread(i); thread = spdk_thread_create(NULL, NULL); assert(thread != NULL); g_ut_threads[i].thread = thread; } set_thread(INVALID_THREAD); return 0; } void free_threads(void) { uint32_t i, num_threads; struct spdk_thread *thread; for (i = 0; i < g_ut_num_threads; i++) { set_thread(i); thread = g_ut_threads[i].thread; spdk_thread_exit(thread); } num_threads = g_ut_num_threads; while (num_threads != 0) { for (i = 0; i < g_ut_num_threads; i++) { set_thread(i); thread = g_ut_threads[i].thread; if (thread == NULL) { continue; } if (spdk_thread_is_exited(thread)) { g_ut_threads[i].thread = NULL; num_threads--; spdk_thread_destroy(thread); } else { spdk_thread_poll(thread, 0, 0); } } } g_ut_num_threads = 0; free(g_ut_threads); g_ut_threads = NULL; spdk_thread_lib_fini(); } bool poll_thread_times(uintptr_t thread_id, uint32_t max_polls) { bool busy = false; struct ut_thread *thread = &g_ut_threads[thread_id]; uintptr_t original_thread_id; uint32_t polls_executed = 0; uint64_t now; if (max_polls == 0) { /* If max_polls is set to 0, * poll until no operation is pending. */ return poll_thread(thread_id); } assert(thread_id != (uintptr_t)INVALID_THREAD); assert(thread_id < g_ut_num_threads); original_thread_id = g_ut_thread_id; set_thread(INVALID_THREAD); now = spdk_get_ticks(); while (polls_executed < max_polls) { if (spdk_thread_poll(thread->thread, 1, now) > 0) { busy = true; } now = spdk_thread_get_last_tsc(thread->thread); polls_executed++; } set_thread(original_thread_id); return busy; } bool poll_thread(uintptr_t thread_id) { bool busy = false; struct ut_thread *thread = &g_ut_threads[thread_id]; uintptr_t original_thread_id; uint64_t now; assert(thread_id != (uintptr_t)INVALID_THREAD); assert(thread_id < g_ut_num_threads); original_thread_id = g_ut_thread_id; set_thread(INVALID_THREAD); now = spdk_get_ticks(); while (spdk_thread_poll(thread->thread, 0, now) > 0) { now = spdk_thread_get_last_tsc(thread->thread); busy = true; } set_thread(original_thread_id); return busy; } void poll_threads(void) { while (true) { bool busy = false; for (uint32_t i = 0; i < g_ut_num_threads; i++) { busy = busy || poll_thread(i); } if (!busy) { break; } } }
8582b156c192d16c349269f7e064f7d1255966ab
bf9f350094a6bd4c4a5ddba22fa3671cf987d82e
/tests/wasi/c/readdir.c
c3afd43a798cf0e814099b583debe95c655964d4
[ "MIT", "BSD-3-Clause" ]
permissive
gwsystems/aWsm
e16759a1d7d899660d07e83026b4c0f5a5d414d8
69c8b6116664d65a851cc459601bef6af3caeaea
refs/heads/master
2023-08-27T11:21:34.680919
2022-09-22T18:05:20
2022-09-22T18:05:20
139,072,240
248
21
BSD-3-Clause
2022-09-14T23:20:31
2018-06-28T21:58:42
C
UTF-8
C
false
false
2,162
c
readdir.c
/* This test was derived from Node.js source code located at the following URL: https://github.com/nodejs/node/blob/d872aaf1cf20d5b6f56a699e2e3a64300e034269/test/wasi/c/readdir.c It retains the the Node.js license as follows: MIT License ----------- Copyright Node.js contributors. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #define _BSD_SOURCE #include <assert.h> #include <dirent.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { DIR* dir; struct dirent* entry; int cnt; dir = opendir("/sandbox/data/readdir"); assert(dir != NULL); cnt = 0; errno = 0; while (NULL != (entry = readdir(dir))) { if (strcmp(entry->d_name, "input.txt") == 0 || strcmp(entry->d_name, "input2.txt") == 0 || strcmp(entry->d_name, "notadir") == 0) { assert(entry->d_type == DT_REG); } else if (strcmp(entry->d_name, "subdir") == 0) { assert(entry->d_type == DT_DIR); } else { assert(0); } cnt++; } assert(errno == 0); assert(cnt == 4); closedir(dir); return 0; }
3e902e442407a295f60623bd18db62e2af730663
e47e2263ca0b60d0c8327f74b4d4078deadea430
/tess-two/jni/com_googlecode_leptonica_android/src/prog/paintmask_reg.c
999db25cf8c6c1c741c7f939f5be6cb177fa39c3
[ "BSD-2-Clause", "CC-BY-2.5", "Apache-2.0" ]
permissive
rmtheis/tess-two
43ed1bdcceee88df696efdee7c3965572ff2121f
ab4cab1bd9794aacb74162aff339daa921a68c3f
refs/heads/master
2023-03-10T08:27:42.539055
2022-03-17T11:21:24
2022-03-17T11:21:24
2,581,357
3,632
1,331
Apache-2.0
2019-10-20T00:51:50
2011-10-15T11:14:00
C
UTF-8
C
false
false
8,346
c
paintmask_reg.c
/*====================================================================* - Copyright (C) 2001 Leptonica. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *====================================================================*/ /* * paintmask_reg.c * * Regression test for painting through a mask onto various * depth images. * * This file shows how one can start with a 32 bpp RGB image and * derive from it the following: * 8 bpp color, cmapped * 4 bpp color, cmapped * 2 bpp color, cmapped * 8 bpp gray * 4 bpp gray * 4 bpp gray, cmapped * 2 bpp gray * 2 bpp gray, cmapped * * For each of these, pixClipMasked() is used to place a 1 bpp * mask over part of the image, clip out the rectangular region * supporting the mask, and paint a given color through the * mask onto the result. * * Finally we do a clip/mask operation on 1 bpp sources. * * If you run 'paintmask_reg display', a pdf of the results is made. */ #include "allheaders.h" int main(int argc, char **argv) { BOX *box; PIX *pixs, *pixs8, *pixm, *pixt1, *pixt2, *pixd; PIXA *pixa; L_REGPARAMS *rp; if (regTestSetup(argc, argv, &rp)) return 1; pixa = pixaCreate(0); /* Start with a 32 bpp image and a mask. Use the * same mask for all clip/masked operations. */ pixs = pixRead("test24.jpg"); pixt1 = pixRead("rabi.png"); box = boxCreate(303, 1983, 800, 500); pixm = pixClipRectangle(pixt1, box, NULL); pixInvert(pixm, pixm); boxDestroy(&box); box = boxCreate(100, 100, 800, 500); /* clips on pixs and derivatives */ pixt2 = pixClipRectangle(pixs, box, NULL); regTestWritePixAndCheck(rp, pixt2, IFF_JFIF_JPEG); /* 0 */ pixaAddPix(pixa, pixt2, L_INSERT); pixDestroy(&pixt1); /* Clip 32 bpp RGB */ pixd = pixClipMasked(pixs, pixm, 100, 100, 0x03c08000); regTestWritePixAndCheck(rp, pixd, IFF_JFIF_JPEG); /* 1 */ pixaAddPix(pixa, pixd, L_INSERT); /* Clip 8 bpp colormapped */ pixt1 = pixMedianCutQuant(pixs, 0); pixt2 = pixClipRectangle(pixt1, box, NULL); regTestWritePixAndCheck(rp, pixt2, IFF_PNG); /* 2 */ pixaAddPix(pixa, pixt2, L_INSERT); pixd = pixClipMasked(pixt1, pixm, 100, 100, 0x03c08000); regTestWritePixAndCheck(rp, pixd, IFF_PNG); /* 3 */ pixaAddPix(pixa, pixd, L_INSERT); pixDestroy(&pixt1); /* Clip 4 bpp colormapped */ pixt1 = pixOctreeQuantNumColors(pixs, 16, 1); pixt2 = pixClipRectangle(pixt1, box, NULL); regTestWritePixAndCheck(rp, pixt2, IFF_PNG); /* 4 */ pixaAddPix(pixa, pixt2, L_INSERT); pixd = pixClipMasked(pixt1, pixm, 100, 100, 0x03c08000); regTestWritePixAndCheck(rp, pixd, IFF_PNG); /* 5 */ pixaAddPix(pixa, pixd, L_INSERT); pixDestroy(&pixt1); /* Clip 2 bpp colormapped */ pixt1 = pixMedianCutQuantGeneral(pixs, 0, 2, 4, 5, 1, 1); pixt2 = pixClipRectangle(pixt1, box, NULL); regTestWritePixAndCheck(rp, pixt2, IFF_PNG); /* 6 */ pixaAddPix(pixa, pixt2, L_INSERT); pixd = pixClipMasked(pixt1, pixm, 100, 100, 0x03608000); regTestWritePixAndCheck(rp, pixd, IFF_PNG); /* 7 */ pixaAddPix(pixa, pixd, L_INSERT); pixDestroy(&pixt1); /* Clip 8 bpp gray */ pixs8 = pixConvertRGBToLuminance(pixs); pixt2 = pixClipRectangle(pixs8, box, NULL); regTestWritePixAndCheck(rp, pixt2, IFF_JFIF_JPEG); /* 8 */ pixaAddPix(pixa, pixt2, L_INSERT); pixd = pixClipMasked(pixs8, pixm, 100, 100, 90); regTestWritePixAndCheck(rp, pixd, IFF_JFIF_JPEG); /* 9 */ pixaAddPix(pixa, pixd, L_INSERT); /* Clip 4 bpp gray */ pixt1 = pixThresholdTo4bpp(pixs8, 16, 0); pixt2 = pixClipRectangle(pixt1, box, NULL); regTestWritePixAndCheck(rp, pixt2, IFF_PNG); /* 10 */ pixaAddPix(pixa, pixt2, L_INSERT); pixd = pixClipMasked(pixt1, pixm, 100, 100, 0); regTestWritePixAndCheck(rp, pixd, IFF_PNG); /* 11 */ pixaAddPix(pixa, pixd, L_INSERT); pixd = pixClipMasked(pixt1, pixm, 100, 100, 5); regTestWritePixAndCheck(rp, pixd, IFF_PNG); /* 12 */ pixaAddPix(pixa, pixd, L_INSERT); pixd = pixClipMasked(pixt1, pixm, 100, 100, 15); regTestWritePixAndCheck(rp, pixd, IFF_PNG); /* 13 */ pixaAddPix(pixa, pixd, L_INSERT); pixDestroy(&pixt1); /* Clip 4 bpp gray, colormapped */ pixt1 = pixThresholdTo4bpp(pixs8, 16, 1); pixt2 = pixClipRectangle(pixt1, box, NULL); regTestWritePixAndCheck(rp, pixt2, IFF_PNG); /* 14 */ pixaAddPix(pixa, pixt2, L_INSERT); pixd = pixClipMasked(pixt1, pixm, 100, 100, 0x55555500); regTestWritePixAndCheck(rp, pixd, IFF_PNG); /* 15 */ pixaAddPix(pixa, pixd, L_INSERT); pixDestroy(&pixt1); /* Clip 2 bpp gray */ pixt1 = pixThresholdTo2bpp(pixs8, 4, 0); pixt2 = pixClipRectangle(pixt1, box, NULL); regTestWritePixAndCheck(rp, pixt2, IFF_PNG); /* 16 */ pixaAddPix(pixa, pixt2, L_INSERT); pixd = pixClipMasked(pixt1, pixm, 100, 100, 1); regTestWritePixAndCheck(rp, pixd, IFF_PNG); /* 17 */ pixaAddPix(pixa, pixd, L_INSERT); pixDestroy(&pixt1); /* Clip 2 bpp gray, colormapped */ pixt1 = pixThresholdTo2bpp(pixs8, 4, 1); pixt2 = pixClipRectangle(pixt1, box, NULL); pixd = pixClipMasked(pixt1, pixm, 100, 100, 0x55555500); regTestWritePixAndCheck(rp, pixd, IFF_PNG); /* 18 */ pixaAddPix(pixa, pixd, L_INSERT); pixDestroy(&pixt1); pixDestroy(&pixt2); pixDestroy(&pixm); pixDestroy(&pixs); pixDestroy(&pixs8); boxDestroy(&box); /* Finally, do the 1 bpp painting through clipped region. * We start with two 1 bpp text sources, use the inverse * of the 2nd for the mask (so we take all of the 1st * pixels under this mask), and for the remainder, which * are the fg pixels in the 2nd, we paint them black (1). * So this is a simple and fast blending of two 1 bpp pix. */ pixs = pixRead("feyn.tif"); box = boxCreate(670, 827, 800, 500); pixt2 = pixClipRectangle(pixs, box, NULL); regTestWritePixAndCheck(rp, pixt2, IFF_PNG); /* 19 */ pixaAddPix(pixa, pixt2, L_INSERT); boxDestroy(&box); pixt1 = pixRead("rabi.png"); box = boxCreate(303, 1983, 800, 500); pixm = pixClipRectangle(pixt1, box, NULL); pixInvert(pixm, pixm); regTestWritePixAndCheck(rp, pixm, IFF_PNG); /* 20 */ pixaAddPix(pixa, pixm, L_INSERT); pixd = pixClipMasked(pixs, pixm, 670, 827, 1); regTestWritePixAndCheck(rp, pixd, IFF_PNG); /* 21 */ pixaAddPix(pixa, pixd, L_INSERT); pixDestroy(&pixs); pixDestroy(&pixt1); boxDestroy(&box); /* If in testing mode, make a pdf */ if (rp->display) { pixaConvertToPdf(pixa, 100, 1.0, L_FLATE_ENCODE, 0, "Paint through mask", "/tmp/lept/regout/paintmask.pdf"); L_INFO("Output pdf: /tmp/lept/regout/paintmask.pdf\n", rp->testname); } pixaDestroy(&pixa); return regTestCleanup(rp); }
36a4236607e2349f3622fb6482e51ba4a1491d93
736e760612f2b431c4b2524fe1a4a8e4083c72a1
/librtmp/source/rtmp-event.c
066e1a31e76294f55e95bb36cc7c899f77c030b6
[ "MIT" ]
permissive
ireader/media-server
7f86da8ff0c8694876a2043d50a1260f315dad8a
3d8647f50fe832856f42b03d1e5b0fe2eafe5796
refs/heads/master
2023-09-03T17:53:13.722595
2023-09-02T03:38:19
2023-09-02T03:38:19
15,598,496
2,785
1,015
MIT
2023-08-30T03:45:24
2014-01-03T01:43:35
C
UTF-8
C
false
false
3,988
c
rtmp-event.c
#include "rtmp-internal.h" #include "rtmp-msgtypeid.h" #include "rtmp-event.h" #include "rtmp-util.h" #include <assert.h> #define N_CHUNK_HEADER 12 static void rtmp_user_control_message_header(uint8_t* out, size_t payload) { // 6.2. User Control Messages (p23) // RTMP uses message type ID 4 for User Control messages // User Control messages SHOULD use message stream ID 0 (known // as the control stream) and be sent in chunk stream ID 2. out[0] = (0x00 << 6) /*fmt*/ | 0x02 /*cs id*/; /* timestamp */ out[1] = 0x00; out[2] = 0x00; out[3] = 0x00; /* message length */ out[4] = (uint8_t)(payload >> 16); out[5] = (uint8_t)(payload >> 8); out[6] = (uint8_t)payload; /* message type id */ out[7] = RTMP_TYPE_EVENT; /* message stream id */ out[8] = 0x00; out[9] = 0x00; out[10] = 0x00; out[11] = 0x00; } // s -> c int rtmp_event_stream_begin(uint8_t* data, size_t bytes, uint32_t streamId) { if (bytes < N_CHUNK_HEADER + 6) return 0; rtmp_user_control_message_header(data, 6); be_write_uint16(N_CHUNK_HEADER + data, RTMP_EVENT_STREAM_BEGIN); be_write_uint32(N_CHUNK_HEADER + data + 2, streamId); return N_CHUNK_HEADER + 6; } // s -> c int rtmp_event_stream_eof(uint8_t* data, size_t bytes, uint32_t streamId) { if (bytes < N_CHUNK_HEADER + 6) return 0; rtmp_user_control_message_header(data, 6); be_write_uint16(N_CHUNK_HEADER + data, RTMP_EVENT_STREAM_EOF); be_write_uint32(N_CHUNK_HEADER + data + 2, streamId); return N_CHUNK_HEADER + 6; } // s -> c int rtmp_event_stream_dry(uint8_t* data, size_t bytes, uint32_t streamId) { if (bytes < N_CHUNK_HEADER + 6) return 0; rtmp_user_control_message_header(data, 6); be_write_uint16(N_CHUNK_HEADER + data, RTMP_EVENT_STREAM_DRY); be_write_uint32(N_CHUNK_HEADER + data + 2, streamId); return N_CHUNK_HEADER + 6; } // c -> s int rtmp_event_set_buffer_length(uint8_t* data, size_t bytes, uint32_t streamId, uint32_t ms) { if (bytes < N_CHUNK_HEADER + 10) return 0; rtmp_user_control_message_header(data, 10); be_write_uint16(N_CHUNK_HEADER + data, RTMP_EVENT_SET_BUFFER_LENGTH); be_write_uint32(N_CHUNK_HEADER + data + 2, streamId); be_write_uint32(N_CHUNK_HEADER + data + 6, ms); return N_CHUNK_HEADER + 10; } // s -> c int rtmp_event_stream_is_record(uint8_t* data, size_t bytes, uint32_t streamId) { if (bytes < N_CHUNK_HEADER + 6) return 0; rtmp_user_control_message_header(data, 6); be_write_uint16(N_CHUNK_HEADER + data, RTMP_EVENT_STREAM_IS_RECORD); be_write_uint32(N_CHUNK_HEADER + data + 2, streamId); return N_CHUNK_HEADER + 6; } // s -> c int rtmp_event_ping(uint8_t* data, size_t bytes, uint32_t timstamp) { if (bytes < N_CHUNK_HEADER + 6) return 0; rtmp_user_control_message_header(data, 6); be_write_uint16(N_CHUNK_HEADER + data, RTMP_EVENT_PING); be_write_uint32(N_CHUNK_HEADER + data + 2, timstamp); return N_CHUNK_HEADER + 6; } // c -> s int rtmp_event_pong(uint8_t* data, size_t bytes, uint32_t timstamp) { if (bytes < N_CHUNK_HEADER + 6) return 0; rtmp_user_control_message_header(data, 6); be_write_uint16(N_CHUNK_HEADER + data, RTMP_EVENT_PONG); be_write_uint32(N_CHUNK_HEADER + data + 2, timstamp); return N_CHUNK_HEADER + 6; } int rtmp_event_handler(struct rtmp_t* rtmp, const struct rtmp_chunk_header_t* header, const uint8_t* data) { uint16_t event = 0; uint32_t streamId = 0; if (header->length < 6) return 0; be_read_uint16(data, &event); be_read_uint32(data + 2, &streamId); switch (event) { case RTMP_EVENT_STREAM_BEGIN: case RTMP_EVENT_STREAM_DRY: case RTMP_EVENT_STREAM_IS_RECORD: return 6; case RTMP_EVENT_STREAM_EOF: rtmp->client.oneof ? rtmp->client.oneof(rtmp->param, streamId) : 0; return 6; case RTMP_EVENT_SET_BUFFER_LENGTH: if (header->length < 10) return 0; be_read_uint32(data + 6, &rtmp->buffer_length_ms); return 10; case RTMP_EVENT_PING: rtmp->client.onping ? rtmp->client.onping(rtmp->param, streamId) : 0; return 6; case RTMP_EVENT_PONG: return 6; default: return header->length; } }
0b68aa94041f0328ad961109cbcc1be746f9ade6
99bdb3251fecee538e0630f15f6574054dfc1468
/bsp/hpmicro/hpm6750evk2/startup/HPM6750/startup.c
b0bab335d52df542b8f613ffef4cd427b8f57b20
[ "Zlib", "LicenseRef-scancode-proprietary-license", "MIT", "BSD-3-Clause", "X11", "BSD-4-Clause-UC", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
3,270
c
startup.c
/* * Copyright (c) 2021-2023 HPMicro * * */ #include "hpm_common.h" #include "hpm_soc.h" #include "hpm_l1c_drv.h" #include <rtthread.h> void system_init(void); extern int entry(void); extern void __libc_init_array(void); extern void __libc_fini_array(void); void system_init(void) { disable_global_irq(CSR_MSTATUS_MIE_MASK); disable_irq_from_intc(); enable_irq_from_intc(); enable_global_irq(CSR_MSTATUS_MIE_MASK); #ifndef CONFIG_NOT_ENABLE_ICACHE l1c_ic_enable(); #endif #ifndef CONFIG_NOT_ENABLE_DCACHE l1c_dc_enable(); #endif } __attribute__((weak)) void c_startup(void) { uint32_t i, size; #ifdef FLASH_XIP extern uint8_t __vector_ram_start__[], __vector_ram_end__[], __vector_load_addr__[]; size = __vector_ram_end__ - __vector_ram_start__; for (i = 0; i < size; i++) { *(__vector_ram_start__ + i) = *(__vector_load_addr__ + i); } #endif extern uint8_t __etext[]; extern uint8_t __bss_start__[], __bss_end__[]; extern uint8_t __tbss_start__[], __tbss_end__[]; extern uint8_t __tdata_start__[], __tdata_end__[]; extern uint8_t __data_start__[], __data_end__[]; extern uint8_t __noncacheable_bss_start__[], __noncacheable_bss_end__[]; extern uint8_t __ramfunc_start__[], __ramfunc_end__[]; extern uint8_t __noncacheable_init_start__[], __noncacheable_init_end__[]; /* tbss section */ size = __tbss_end__ - __tbss_start__; for (i = 0; i < size; i++) { *(__tbss_start__ + i) = 0; } /* bss section */ size = __bss_end__ - __bss_start__; for (i = 0; i < size; i++) { *(__bss_start__ + i) = 0; } /* noncacheable bss section */ size = __noncacheable_bss_end__ - __noncacheable_bss_start__; for (i = 0; i < size; i++) { *(__noncacheable_bss_start__ + i) = 0; } /* tdata section LMA: etext */ size = __tdata_end__ - __tdata_start__; for (i = 0; i < size; i++) { *(__tdata_start__ + i) = *(__etext + i); } /* data section LMA: etext */ size = __data_end__ - __data_start__; for (i = 0; i < size; i++) { *(__data_start__ + i) = *(__etext + (__tdata_end__ - __tdata_start__) + i); } /* ramfunc section LMA: etext + data length */ size = __ramfunc_end__ - __ramfunc_start__; for (i = 0; i < size; i++) { *(__ramfunc_start__ + i) = *(__etext + (__data_end__ - __tdata_start__) + i); } /* noncacheable init section LMA: etext + data length + ramfunc length */ size = __noncacheable_init_end__ - __noncacheable_init_start__; for (i = 0; i < size; i++) { *(__noncacheable_init_start__ + i) = *(__etext + (__data_end__ - __tdata_start__) + (__ramfunc_end__ - __ramfunc_start__) + i); } } __attribute__((weak)) int main(void) { while(1); } void reset_handler(void) { /** * Disable preemptive interrupt */ HPM_PLIC->FEATURE = 0; /* * Initialize LMA/VMA sections. * Relocation for any sections that need to be copied from LMA to VMA. */ c_startup(); /* Call platform specific hardware initialization */ system_init(); /* Do global constructors */ __libc_init_array(); /* Entry function */ entry(); } __attribute__((weak)) void _init() { }
b547c508258a2e3923836df4c7bf59a39fc9d931
61da6274995cf914291af51bd02e60f408fdfedd
/src/misc/memcfl.c
624c56352d46932249c8b4da38feb5c965d1304c
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
mrirecon/bart
360d518b4c79836d506803aa4a77e8e252ab820b
a3c9dc313f79c4c52f1ba3e617d5831ef088ddf7
refs/heads/master
2023-08-31T11:01:08.932824
2023-08-30T12:15:35
2023-08-30T13:51:18
23,212,230
264
185
BSD-3-Clause
2023-08-03T18:43:36
2014-08-22T03:57:09
C
UTF-8
C
false
false
2,923
c
memcfl.c
/* Copyright 2021-2023. Martin Uecker and BART Developers. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. */ #include <stdbool.h> #include <complex.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include "misc/misc.h" #include "memcfl.h" struct memcfl { const char* name; int D; const long* dims; complex float* data; int refcount; bool managed; struct memcfl* next; }; static struct memcfl* memcfl_list = NULL; void memcfl_register(const char* name, int D, const long dims[D], complex float* data, bool managed) { PTR_ALLOC(struct memcfl, mem); mem->name = strdup(name); mem->D = D; mem->next = memcfl_list; long* ndims = *TYPE_ALLOC(long[D]); for (int i = 0; i < D; i++) ndims[i] = dims[i]; mem->dims = ndims; mem->data = data; mem->refcount = 1; mem->managed = managed; memcfl_list = PTR_PASS(mem); } complex float* memcfl_create(const char* name, int D, const long dims[D]) { complex float* data = xmalloc(io_calc_size(D, dims, sizeof(complex float))); memcfl_register(name, D, dims, data, true); return data; } bool memcfl_exists(const char* name) { struct memcfl* mem = memcfl_list; while (NULL != mem) { if (0 == strcmp(mem->name, name)) return true; mem = mem->next; } return false; } const char** memcfl_list_all(void) { struct memcfl* mem = memcfl_list; int count = 0; while (NULL != mem) { mem = mem->next; count++; } const char* (*list)[count + 1] = xmalloc(sizeof *list); (*list)[0] = (char*)(uintptr_t)count; // ! mem = memcfl_list; for(int i = 1; i < count + 1; i++) { (*list)[i] = NULL; if (mem != NULL) (*list)[i] = mem->name; mem = mem->next; } return *list; } complex float* memcfl_load(const char* name, int D, long dims[D]) { struct memcfl* mem = memcfl_list; while (NULL != mem) { if (0 == strcmp(mem->name, name)) break; mem = mem->next; } if (NULL == mem) error("Error loading mem cfl %s\n", name); if (D < mem->D) error("Error loading mem cfl %s\n", name); for (int i = 0; i < D; i++) dims[i] = (i < mem->D) ? mem->dims[i] : 1; mem->refcount++; return mem->data; } bool memcfl_unmap(const complex float* p) { struct memcfl* mem = memcfl_list; while (NULL != mem) { if (mem->data == p) break; mem = mem->next; } if (NULL == mem) return false; if (0 >= mem->refcount) error("Error unmapping mem cfl\n"); mem->refcount--; return true; } void memcfl_unlink(const char* name) { struct memcfl** mem = &memcfl_list; while (NULL != *mem) { if (0 == strcmp((*mem)->name, name)) break; mem = &(*mem)->next; } struct memcfl* o = *mem; *mem = (*mem)->next; // for regular files this is not a problem if (0 < o->refcount) error("Error unlinking mem cfl\n"); xfree(o->name); xfree(o->dims); if (o->managed) xfree(o->data); xfree(o); }
b0a622d0d2940b0f501dcea72d85af1a0c432652
99bdb3251fecee538e0630f15f6574054dfc1468
/bsp/ft32/libraries/FT32F0xx/FT32F0xx_Driver/templates/Src/ft32f0xx_it.c
f9f816e0e63efde923490e27ec6170d78bb832ef
[ "Apache-2.0", "Zlib", "LicenseRef-scancode-proprietary-license", "MIT", "BSD-3-Clause", "X11", "BSD-4-Clause-UC", "LicenseRef-scancode-unknown-license-reference" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
1,376
c
ft32f0xx_it.c
/** ****************************************************************************** * @file ft32F0xx_it.c * @author FMD AE * @brief * @version V1.0.0 * @data 2021-07-01 ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "ft32f0xx_it.h" /** * @brief This function handles NMI exception. * @param None * @retval None */ void NMI_Handler(void) { } /** * @brief This function handles Hard Fault exception. * @param None * @retval None */ void HardFault_Handler(void) { /* Go to infinite loop when Hard Fault exception occurs */ while (1) { } } /** * @brief This function handles SVCall exception. * @param None * @retval None */ void SVC_Handler(void) { } /** * @brief This function handles PendSVC exception. * @param None * @retval None */ void PendSV_Handler(void) { } /** * @brief This function handles SysTick Handler. * @param None * @retval None */ void SysTick_Handler(void) { } /** * @brief This function handles PPP interrupt request. * @param None * @retval None */ /*void PPP_IRQHandler(void) { }*/ /** * @} */ /** * @} */ /************************ (C) COPYRIGHT FMD *****END OF FILE****/
df242ad67e228f8bc7a07301d12f026c786f02ed
382a4dacbf7d6e6da096ddac660ba7a40af350cf
/examples/LVGL/LilyGoGui/arrow_left_png.c
2f3ce7cb09a159efa2a003bf9936a396578b9f6b
[ "MIT" ]
permissive
Xinyuan-LilyGO/TTGO_TWatch_Library
84b1a580ad931caac7407bf110fde5b9248be3c4
6a07f3762a4d11c8e5c0c2d6f9340ee4fdaa5fcb
refs/heads/master
2023-08-18T15:36:22.029944
2023-07-03T01:27:29
2023-07-03T01:27:29
202,286,916
776
293
MIT
2023-08-31T05:18:44
2019-08-14T06:17:29
C
UTF-8
C
false
false
19,674
c
arrow_left_png.c
#include <lvgl/lvgl.h> #ifndef LV_ATTRIBUTE_MEM_ALIGN #define LV_ATTRIBUTE_MEM_ALIGN #endif #ifndef LV_ATTRIBUTE_IMG_ARROW_LEFT_PNG #define LV_ATTRIBUTE_IMG_ARROW_LEFT_PNG #endif const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_ARROW_LEFT_PNG uint8_t arrow_left_png_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x3c, 0x25, 0xbf, 0x25, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x25, 0xbb, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x3c, 0x25, 0xb7, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x40, 0x25, 0xb0, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x43, 0x25, 0xac, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x47, 0x25, 0xab, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x25, 0x4b, 0x25, 0xaf, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xab, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xa3, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x25, 0x4f, 0x25, 0xb7, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x53, 0x25, 0xbb, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x54, 0x25, 0xbc, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4f, 0x25, 0xc0, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4b, 0x25, 0xc4, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x47, 0x25, 0xc4, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x43, 0x25, 0xbf, 0x25, 0xa7, #endif #if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0 /*Pixel format: Alpha 8 bit, Red: 5 bit, Green: 6 bit, Blue: 5 bit*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x31, 0x3c, 0x65, 0x29, 0xbf, 0x65, 0x29, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x31, 0x38, 0x65, 0x29, 0xbb, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x29, 0x3c, 0x65, 0x29, 0xb7, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x29, 0x40, 0x66, 0x31, 0xb0, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x31, 0x43, 0x65, 0x29, 0xac, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x29, 0x47, 0x66, 0x31, 0xab, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x65, 0x29, 0x4b, 0x65, 0x29, 0xaf, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xab, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xa3, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x66, 0x31, 0x4f, 0x65, 0x29, 0xb7, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x29, 0x53, 0x65, 0x29, 0xbb, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x29, 0x54, 0x66, 0x31, 0xbc, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x31, 0x4f, 0x65, 0x29, 0xc0, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x29, 0x4b, 0x65, 0x29, 0xc4, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x29, 0x47, 0x65, 0x29, 0xc4, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x65, 0x29, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x29, 0x43, 0x65, 0x29, 0xbf, 0x66, 0x31, 0xa7, #endif #if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0 /*Pixel format: Alpha 8 bit, Red: 5 bit, Green: 6 bit, Blue: 5 bit BUT the 2 color bytes are swapped*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x66, 0x3c, 0x29, 0x65, 0xbf, 0x29, 0x65, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x66, 0x38, 0x29, 0x65, 0xbb, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x45, 0x3c, 0x29, 0x65, 0xb7, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x65, 0x40, 0x31, 0x66, 0xb0, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x66, 0x43, 0x29, 0x65, 0xac, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x65, 0x47, 0x31, 0x66, 0xab, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x29, 0x65, 0x4b, 0x29, 0x65, 0xaf, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xab, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xa3, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x31, 0x66, 0x4f, 0x29, 0x65, 0xb7, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x65, 0x53, 0x29, 0x65, 0xbb, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x65, 0x54, 0x31, 0x66, 0xbc, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x66, 0x4f, 0x29, 0x65, 0xc0, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x65, 0x4b, 0x29, 0x65, 0xc4, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x65, 0x47, 0x29, 0x65, 0xc4, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x29, 0x65, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x65, 0x43, 0x29, 0x65, 0xbf, 0x31, 0x66, 0xa7, #endif #if LV_COLOR_DEPTH == 32 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x2e, 0x2e, 0x3c, 0x2c, 0x2c, 0x2c, 0xbf, 0x2b, 0x2b, 0x2b, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x2d, 0x2d, 0x38, 0x2c, 0x2c, 0x2c, 0xbb, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x3c, 0x2b, 0x2b, 0x2b, 0xb7, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x2c, 0x2c, 0x40, 0x2d, 0x2d, 0x2d, 0xb0, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x2e, 0x2e, 0x43, 0x2c, 0x2c, 0x2c, 0xac, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x2b, 0x2b, 0x47, 0x2d, 0x2d, 0x2d, 0xab, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x2c, 0x2c, 0x4b, 0x2c, 0x2c, 0x2c, 0xaf, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xab, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xa3, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x2d, 0x2d, 0x4f, 0x2b, 0x2b, 0x2b, 0xb7, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x2c, 0x2c, 0x53, 0x2c, 0x2c, 0x2c, 0xbb, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x2b, 0x2b, 0x54, 0x2d, 0x2d, 0x2d, 0xbc, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x2d, 0x2d, 0x4f, 0x2c, 0x2c, 0x2c, 0xc0, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x2c, 0x2c, 0x4b, 0x2c, 0x2c, 0x2c, 0xc4, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x2c, 0x2c, 0x47, 0x2c, 0x2c, 0x2c, 0xc4, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x2b, 0x2b, 0x43, 0x2c, 0x2c, 0x2c, 0xbf, 0x2d, 0x2d, 0x2d, 0xa7, #endif }; const lv_img_dsc_t arrow_left_png = { .header.always_zero = 0, .header.w = 16, .header.h = 16, .data_size = 256 * LV_IMG_PX_SIZE_ALPHA_BYTE, .header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA, .data = arrow_left_png_map, };
9c18a39b4dcee1506d514174875d2a0a23f09fc1
0cc343d927d5db6693006018986715c43acab961
/examples/termination/funcptr.c
4e8a2f759e2160dbf089855212e9e8119efd479d
[ "MIT" ]
permissive
verifast/verifast
ec0101fc4a69bd33c5f66be4444169c4e060ead8
d152da790c7ebf72ce616533a6c83082629adbdb
refs/heads/master
2023-08-25T00:13:51.464802
2023-08-13T10:00:00
2023-08-13T10:00:00
14,519,163
325
64
NOASSERTION
2023-08-10T21:16:08
2013-11-19T08:57:02
OCaml
UTF-8
C
false
false
5,640
c
funcptr.c
#include <stdlib.h> //@ #include "termination.gh" struct int_func_object { int_func *invoke; //@ predicate(int_func_object, list<void *>) p; }; typedef struct int_func_object *int_func_object; typedef int int_func/*@(predicate(int_func_object, list<void *>) p)@*/(int_func_object object, int x); //@ requires [?f]int_func_object(object, this, p, ?d) &*& call_perm(currentThread, d); //@ ensures [f]int_func_object(object, this, p, d); //@ terminates; /*@ predicate int_func_object(int_func_object object, void *invoke, predicate(int_func_object, list<void *>) p, list<void *> d) = object->invoke |-> invoke &*& object->p |-> p &*& [_]is_int_func(invoke, p) &*& p(object, ?d_) &*& bag_le(func_lt, cons(invoke, d_), d) == true; @*/ int int_func_object_invoke(int_func_object object, int x) //@ requires [?f]int_func_object(object, _, _, ?d) &*& call_perm_below(currentThread, ?d1) &*& bag_lt(func_lt, cons(int_func_object_invoke, d), d1) == true; //@ ensures [f]int_func_object(object, _, _, d); //@ terminates; { //@ call_perm(cons(int_func_object_invoke, d)); //@ call_perm_below(2); //@ bag_lt_xs_cons_xs(func_lt, int_func_object_invoke, d); //@ open [f]int_func_object(object, _, ?p, d); //@ assert [f]p(object, ?d_); int_func *invoke = object->invoke; //@ close [f]int_func_object(object, invoke, p, d); //@ is_order_func_lt(); //@ bag_le_cons_xs_cons_ys(func_lt, invoke, nil, d_); //@ bag_le_bag_lt(func_lt, cons(invoke, d_), d, cons(int_func_object_invoke, d)); //@ bag_le_bag_lt(func_lt, {invoke}, cons(invoke, d_), cons(int_func_object_invoke, d)); //@ consume_call_perm_for(invoke); //@ call_perm(d); return invoke(object, x); } /*@ predicate plus_one(int_func_object object, list<void *> d) = malloc_block_int_func_object(object); @*/ int plus_one(int_func_object object, int x) //@ requires [?f]int_func_object(object, plus_one, @plus_one, ?d) &*& call_perm(currentThread, d); //@ ensures [f]int_func_object(object, plus_one, @plus_one, d); //@ terminates; { //@ leak call_perm(currentThread, d); return x + 1; } int_func_object create_plus_one() //@ requires call_perm_below(currentThread, ?d) &*& bag_lt(func_lt, {create_plus_one}, d) == true; //@ ensures int_func_object(result, _, _, {create_plus_one}); //@ terminates; { int_func_object fObj = malloc(sizeof(struct int_func_object)); if (fObj == 0) abort(); fObj->invoke = plus_one; //@ fObj->p = @plus_one; //@ produce_function_pointer_chunk int_func(plus_one)(@plus_one)(object, x) { call(); } //@ close plus_one(fObj, nil); return fObj; //@ close int_func_object(fObj, plus_one, @plus_one, {create_plus_one}); //@ leak call_perm_below(currentThread, _); } struct twice_data { struct int_func_object object; int_func_object f; }; /*@ predicate twice(int_func_object object, list<void *> d) = twice_data_f((void *)object, ?f) &*& int_func_object(f, _, _, d); @*/ int twice(int_func_object object, int x) //@ requires [?frac]int_func_object(object, twice, @twice, ?d) &*& call_perm(currentThread, d); //@ ensures [frac]int_func_object(object, twice, @twice, d); //@ terminates; { //@ open int_func_object(_, _, _, _); //@ open twice(_, ?df); //@ call_perm_weaken(cons(twice, df)); struct twice_data *twiceData = (void *)object; int_func_object fObj = twiceData->f; //@ call_perm_below(1); //@ is_order_func_lt(); //@ bag_lt_cons_lt(func_lt, int_func_object_invoke, twice, df); int y = int_func_object_invoke(fObj, x); return 2 * y; //@ close [frac]twice(object, df); //@ close [frac]int_func_object(object, twice, @twice, d); } int_func_object create_twice(int_func_object fObj) //@ requires int_func_object(fObj, _, _, ?d_fObj) &*& call_perm_below(currentThread, ?d) &*& bag_lt(func_lt, cons(create_twice, d_fObj), d) == true; //@ ensures int_func_object(result, _, _, cons(create_twice, d_fObj)); //@ terminates; { //@ call_perm(cons(create_twice, d_fObj)); struct twice_data *obj = malloc(sizeof(struct twice_data)); if (obj == 0) abort(); obj->object.invoke = twice; obj->f = fObj; //@ is_order_func_lt(); //@ bag_lt_cons_lt(func_lt, twice, create_twice, d_fObj); //@ int_func_object object = (void *)obj; return (void *)obj; //@ object->p = @twice; //@ produce_function_pointer_chunk int_func(twice)(@twice)(object_, x) { call(); } //@ close twice(object, d_fObj); //@ close int_func_object((void *)obj, twice, @twice, cons(create_twice, d_fObj)); //@ leak call_perm(currentThread, _); //@ leak malloc_block_twice_data(obj); } int main() //@ : main //@ requires true; //@ ensures true; //@ terminates; { //@ produce_call_below_perm_(); //@ call_below_perm__elim(main); //@ produce_call_below_perm_(); //@ call_below_perm__elim(main); //@ produce_call_below_perm_(); //@ call_below_perm__elim(main); //@ produce_call_below_perm_(); //@ call_below_perm__elim(main); int_func_object plusOne = create_plus_one(); int_func_object twicePlusOne = create_twice(plusOne); int_func_object twiceTwicePlusOne = create_twice(twicePlusOne); //@ merge_fractions call_perm_below(currentThread, {main}); int_func_object_invoke(twiceTwicePlusOne, 10); //@ leak int_func_object(twiceTwicePlusOne, _, _, _); return 0; }
8ed2a713f6e3fe1c0d7bbfe6dbd3a6a9add6cbe3
b636c23f8928ff3663e8247e8b689d971def1fcf
/lib/erlang/c_src/src/lib/cat_static_queue.c
975b6bc693df6ecca8ec6349cbbb7e0c2d2d9108
[ "Apache-2.0", "LGPL-2.1-or-later", "BSD-3-Clause", "GPL-2.0-only", "LicenseRef-scancode-unknown-license-reference" ]
permissive
dianping/cat
73952902bf432b1b9f50e107203f7d0941ff157e
4684ba7bbbeffe071092e99333f28410d08f18ef
refs/heads/master
2023-07-14T16:35:00.029273
2023-06-17T14:52:23
2023-06-17T23:49:19
7,010,724
19,076
5,869
Apache-2.0
2023-08-15T14:28:11
2012-12-05T02:31:48
Java
UTF-8
C
false
false
4,030
c
cat_static_queue.c
/* * Copyright (c) 2011-2018, Meituan Dianping. All Rights Reserved. * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "cat_static_queue.h" CATStaticQueue *createCATStaticQueue(size_t maxQueueSize) { CATStaticQueue *pQue = (CATStaticQueue *) malloc(sizeof(CATStaticQueue) + maxQueueSize * sizeof(void *)); if (pQue == NULL) { return NULL; } pQue->head = 0; pQue->tail = 0; pQue->size = 0; pQue->maxQueueSize = maxQueueSize; return pQue; } int pushBackCATStaticQueue(CATStaticQueue *pQueue, void *pData) { if (isCATStaticQueueFull(pQueue)) { return CATSTATICQUEUE_ERR; } if (isCATStaticQueueEmpty(pQueue)) { pQueue->tail = 0; pQueue->head = 0; pQueue->size = 1; pQueue->valueArray[0] = pData; return CATSTATICQUEUE_OK; } if (++pQueue->head == pQueue->maxQueueSize) { pQueue->head = 0; } pQueue->valueArray[pQueue->head] = pData; ++pQueue->size; return CATSTATICQUEUE_OK; } int pushFrontCATStaticQueue(CATStaticQueue *pQueue, void *pData) { if (isCATStaticQueueFull(pQueue)) { return CATSTATICQUEUE_ERR; } if (isCATStaticQueueEmpty(pQueue)) { pQueue->tail = 0; pQueue->head = 0; pQueue->size = 1; pQueue->valueArray[0] = pData; return CATSTATICQUEUE_OK; } if (--pQueue->tail < 0) { pQueue->tail = pQueue->maxQueueSize - 1; } pQueue->valueArray[pQueue->tail] = pData; ++pQueue->size; return CATSTATICQUEUE_OK; } void *popBackCATStaticQueue(CATStaticQueue *pQueue) { if (isCATStaticQueueEmpty(pQueue)) { return NULL; } void *pData = pQueue->valueArray[pQueue->head]; if (--pQueue->size == 0) { pQueue->tail = 0; pQueue->head = 0; pQueue->size = 0; return pData; } else { if (--pQueue->head < 0) { pQueue->head = pQueue->maxQueueSize - 1; } } return pData; } void *popFrontCATStaticQueue(CATStaticQueue *pQueue) { if (isCATStaticQueueEmpty(pQueue)) { return NULL; } void *pData = pQueue->valueArray[pQueue->tail]; if (--pQueue->size == 0) { pQueue->tail = 0; pQueue->head = 0; pQueue->size = 0; return pData; } else { if (++pQueue->tail == pQueue->maxQueueSize) { pQueue->tail = 0; } } return pData; } void *pryBackCATStaticQueue(CATStaticQueue *pQueue) { if (isCATStaticQueueEmpty(pQueue)) { return NULL; } return pQueue->valueArray[pQueue->head]; } void *pryFrontCATStaticQueue(CATStaticQueue *pQueue) { if (isCATStaticQueueEmpty(pQueue)) { return NULL; } return pQueue->valueArray[pQueue->tail]; } void *getCATStaticQueueByIndex(CATStaticQueue *pQueue, size_t index) { if (!pQueue->size || pQueue->size - 1 < index) { return NULL; } index += pQueue->tail; if (index >= pQueue->maxQueueSize) { index -= pQueue->maxQueueSize; } return pQueue->valueArray[index]; } void clearCATStaticQueue(CATStaticQueue *pQueue) { pQueue->head = 0; pQueue->size = 0; pQueue->tail = 0; } void destroyCATStaticQueue(CATStaticQueue *pQueue) { free(pQueue); }
058881a76868feb81b2649a82fd660c2c129607e
5eff7a36d9a9917dce9111f0c3074375fe6f7656
/app/xenodm/xenodm/netaddr.c
c274aadd63aa2a5c9619813c1cb049beb777932e
[ "MIT-open-group", "MIT", "BSD-3-Clause", "X11-distribute-modifications-variant", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
openbsd/xenocara
cb392d02ebba06f6ff7d826fd8a89aa3b8401779
a012b5de33ea0b977095d77316a521195b26cc6b
refs/heads/master
2023-08-25T12:16:58.862008
2023-08-12T16:16:25
2023-08-12T16:16:25
66,967,384
177
66
null
2023-07-22T18:12:37
2016-08-30T18:36:01
C
UTF-8
C
false
false
3,390
c
netaddr.c
/* Copyright 1991, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* * xdm - X display manager * * netaddr.c - Interpretation of XdmcpNetaddr object. */ #include "dm.h" #include "dm_error.h" #include <X11/X.h> /* FamilyInternet, etc. */ # include "dm_socket.h" # ifdef UNIXCONN # include <sys/un.h> /* struct sockaddr_un */ # endif /* given an XdmcpNetaddr, returns the socket protocol family used, e.g., AF_INET */ int NetaddrFamily(XdmcpNetaddr netaddrp) { return ((struct sockaddr *)netaddrp)->sa_family; } /* given an XdmcpNetaddr, returns a pointer to the network address and sets *lenp to the length of the address */ char * NetaddrAddress(XdmcpNetaddr netaddrp, int *lenp) { switch (NetaddrFamily(netaddrp)) { # ifdef UNIXCONN case AF_UNIX: *lenp = strlen(((struct sockaddr_un *)netaddrp)->sun_path); return (char *) (((struct sockaddr_un *)netaddrp)->sun_path); # endif # ifdef TCPCONN case AF_INET: *lenp = sizeof (struct in_addr); return (char *) &(((struct sockaddr_in *)netaddrp)->sin_addr); case AF_INET6: { struct in6_addr *a = &(((struct sockaddr_in6 *)netaddrp)->sin6_addr); if (IN6_IS_ADDR_V4MAPPED(a)) { *lenp = sizeof (struct in_addr); return ((char *) &(a->s6_addr))+12; } else { *lenp = sizeof (struct in6_addr); return (char *) &(a->s6_addr); } } # endif default: *lenp = 0; return NULL; } } /* given an XdmcpNetaddr, sets *addr to the network address used and sets *len to the number of bytes in addr. Returns the X protocol family used, e.g., FamilyInternet */ int ConvertAddr (XdmcpNetaddr saddr, int *len, char **addr) { int retval; if ((len == NULL) || (saddr == NULL)) return -1; *addr = NetaddrAddress(saddr, len); switch (NetaddrFamily(saddr)) { case AF_UNSPEC: retval = FamilyLocal; break; case AF_UNIX: retval = FamilyLocal; break; # ifdef TCPCONN case AF_INET: retval = FamilyInternet; break; case AF_INET6: if (*len == sizeof(struct in_addr)) retval = FamilyInternet; else retval = FamilyInternet6; break; # endif default: retval = -1; break; } Debug ("ConvertAddr returning %d for family %d\n", retval, NetaddrFamily(saddr)); return retval; }
b9b64893d68dbf969eaf7d231c9233046dd97f04
99bdb3251fecee538e0630f15f6574054dfc1468
/bsp/lpc55sxx/lpc55s06_nxp_evk/board/MCUX_Config/board/board.h
7162963542043c70e8d3f04c07d4a9b99aff73ce
[ "Zlib", "LicenseRef-scancode-proprietary-license", "MIT", "BSD-3-Clause", "X11", "BSD-4-Clause-UC", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
8,217
h
board.h
/* * Copyright 2017-2018 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef _BOARD_H_ #define _BOARD_H_ #include "clock_config.h" #include "fsl_common.h" #include "fsl_reset.h" #include "fsl_gpio.h" #include "fsl_iocon.h" /******************************************************************************* * Definitions ******************************************************************************/ /*! @brief The board name */ #define BOARD_NAME "LPCXpresso55S06" /*! @brief The UART to use for debug messages. */ /* TODO: rename UART to USART */ #define BOARD_DEBUG_UART_TYPE kSerialPort_Uart #define BOARD_DEBUG_UART_BASEADDR (uint32_t) USART0 #define BOARD_DEBUG_UART_INSTANCE 0U #define BOARD_DEBUG_UART_CLK_FREQ 12000000U #define BOARD_DEBUG_UART_CLK_ATTACH kFRO12M_to_FLEXCOMM0 #define BOARD_DEBUG_UART_RST kFC0_RST_SHIFT_RSTn #define BOARD_DEBUG_UART_CLKSRC kCLOCK_Flexcomm0 #define BOARD_UART_IRQ_HANDLER FLEXCOMM0_IRQHandler #define BOARD_UART_IRQ FLEXCOMM0_IRQn #define BOARD_ACCEL_I2C_BASEADDR I2C0 #define BOARD_ACCEL_I2C_CLOCK_FREQ 12000000 #ifndef BOARD_DEBUG_UART_BAUDRATE #define BOARD_DEBUG_UART_BAUDRATE 115200U #endif /* BOARD_DEBUG_UART_BAUDRATE */ #define BOARD_CODEC_I2C_BASEADDR I2C4 #define BOARD_CODEC_I2C_CLOCK_FREQ 12000000 #define BOARD_CODEC_I2C_INSTANCE 4 #ifndef BOARD_LED_RED_GPIO #define BOARD_LED_RED_GPIO GPIO #endif #define BOARD_LED_RED_GPIO_PORT 0U #ifndef BOARD_LED_RED_GPIO_PIN #define BOARD_LED_RED_GPIO_PIN 21U #endif #ifndef BOARD_LED_BLUE_GPIO #define BOARD_LED_BLUE_GPIO GPIO #endif #define BOARD_LED_BLUE_GPIO_PORT 0U #ifndef BOARD_LED_BLUE_GPIO_PIN #define BOARD_LED_BLUE_GPIO_PIN 22U #endif #ifndef BOARD_LED_GREEN_GPIO #define BOARD_LED_GREEN_GPIO GPIO #endif #define BOARD_LED_GREEN_GPIO_PORT 0U #ifndef BOARD_LED_GREEN_GPIO_PIN #define BOARD_LED_GREEN_GPIO_PIN 18U #endif #ifndef BOARD_SW1_GPIO #define BOARD_SW1_GPIO GPIO #endif #define BOARD_SW1_GPIO_PORT 0U #ifndef BOARD_SW1_GPIO_PIN #define BOARD_SW1_GPIO_PIN 28U #endif #define BOARD_SW1_NAME "SW1" #define BOARD_SW1_IRQ PIN_INT0_IRQn #define BOARD_SW1_IRQ_HANDLER PIN_INT0_IRQHandler #ifndef BOARD_SW3_GPIO #define BOARD_SW3_GPIO GPIO #endif #define BOARD_SW3_GPIO_PORT 1U #ifndef BOARD_SW3_GPIO_PIN #define BOARD_SW3_GPIO_PIN 9U #endif #define BOARD_SW3_NAME "SW3" #define BOARD_SW3_IRQ PIN_INT1_IRQn #define BOARD_SW3_IRQ_HANDLER PIN_INT1_IRQHandler #define BOARD_SW3_GPIO_PININT_INDEX 1 #ifndef BOARD_SW4_GPIO #define BOARD_SW4_GPIO GPIO #endif #define BOARD_SW4_GPIO_PORT 0U #ifndef BOARD_SW4_GPIO_PIN #define BOARD_SW4_GPIO_PIN 5U #endif #define BOARD_SW4_NAME "SW4" #define BOARD_SW4_IRQ PIN_INT0_IRQn #define BOARD_SW4_IRQ_HANDLER PIN_INT0_IRQHandler #define BOARD_SW4_GPIO_PININT_INDEX 1 /* Board led color mapping */ #define LOGIC_LED_ON 1U #define LOGIC_LED_OFF 0U #define BOARD_SDIF_CLK_ATTACH kMAIN_CLK_to_SDIO_CLK #define LED_RED_INIT(output) \ { \ IOCON_PinMuxSet(IOCON, BOARD_LED_RED_GPIO_PORT, BOARD_LED_RED_GPIO_PIN, IOCON_DIGITAL_EN); \ GPIO_PinInit(BOARD_LED_RED_GPIO, BOARD_LED_RED_GPIO_PORT, BOARD_LED_RED_GPIO_PIN, \ &(gpio_pin_config_t){kGPIO_DigitalOutput, (output)}); /*!< Enable target LED1 */ \ } #define LED_RED_OFF() \ GPIO_PortClear(BOARD_LED_RED_GPIO, BOARD_LED_RED_GPIO_PORT, \ 1U << BOARD_LED_RED_GPIO_PIN) /*!< Turn off target LED1 */ #define LED_RED_ON() \ GPIO_PortSet(BOARD_LED_RED_GPIO, BOARD_LED_RED_GPIO_PORT, \ 1U << BOARD_LED_RED_GPIO_PIN) /*!< Turn on target LED1 \ \ \ \ \ \ \ \ \ \ \ */ #define LED_RED_TOGGLE() \ GPIO_PortToggle(BOARD_LED_RED_GPIO, BOARD_LED_RED_GPIO_PORT, \ 1U << BOARD_LED_RED_GPIO_PIN) /*!< Toggle on target LED1 */ #define LED_BLUE_INIT(output) \ { \ IOCON_PinMuxSet(IOCON, BOARD_LED_BLUE_GPIO_PORT, BOARD_LED_BLUE_GPIO_PIN, IOCON_DIGITAL_EN); \ GPIO_PinInit(BOARD_LED_BLUE_GPIO, BOARD_LED_BLUE_GPIO_PORT, BOARD_LED_BLUE_GPIO_PIN, \ &(gpio_pin_config_t){kGPIO_DigitalOutput, (output)}); /*!< Enable target LED1 */ \ } #define LED_BLUE_OFF() \ GPIO_PortClear(BOARD_LED_BLUE_GPIO, BOARD_LED_BLUE_GPIO_PORT, \ 1U << BOARD_LED_BLUE_GPIO_PIN) /*!< Turn off target LED1 */ #define LED_BLUE_ON() \ GPIO_PortSet(BOARD_LED_BLUE_GPIO, BOARD_LED_BLUE_GPIO_PORT, \ 1U << BOARD_LED_BLUE_GPIO_PIN) /*!< Turn on target LED1 */ #define LED_BLUE_TOGGLE() \ GPIO_PortToggle(BOARD_LED_BLUE_GPIO, BOARD_LED_BLUE_GPIO_PORT, \ 1U << BOARD_LED_BLUE_GPIO_PIN) /*!< Toggle on target LED1 */ #define LED_GREEN_INIT(output) \ GPIO_PinInit(BOARD_LED_GREEN_GPIO, BOARD_LED_GREEN_GPIO_PORT, BOARD_LED_GREEN_GPIO_PIN, \ &(gpio_pin_config_t){kGPIO_DigitalOutput, (output)}) /*!< Enable target LED1 */ #define LED_GREEN_OFF() \ GPIO_PortClear(BOARD_LED_GREEN_GPIO, BOARD_LED_GREEN_GPIO_PORT, \ 1U << BOARD_LED_GREEN_GPIO_PIN) /*!< Turn off target LED1 */ #define LED_GREEN_ON() \ GPIO_PortSet(BOARD_LED_GREEN_GPIO, BOARD_LED_GREEN_GPIO_PORT, \ 1U << BOARD_LED_GREEN_GPIO_PIN) /*!< Turn on target LED1 */ #define LED_GREEN_TOGGLE() \ GPIO_PortToggle(BOARD_LED_GREEN_GPIO, BOARD_LED_GREEN_GPIO_PORT, \ 1U << BOARD_LED_GREEN_GPIO_PIN) /*!< Toggle on target LED1 */ /* Display. */ #define BOARD_LCD_DC_GPIO GPIO #define BOARD_LCD_DC_GPIO_PORT 0U #define BOARD_LCD_DC_GPIO_PIN 24U #if defined(__cplusplus) extern "C" { #endif /* __cplusplus */ /******************************************************************************* * API ******************************************************************************/ void BOARD_InitDebugConsole(void); #if defined(SDK_I2C_BASED_COMPONENT_USED) && SDK_I2C_BASED_COMPONENT_USED void BOARD_I2C_Init(I2C_Type *base, uint32_t clkSrc_Hz); status_t BOARD_I2C_Send(I2C_Type *base, uint8_t deviceAddress, uint32_t subAddress, uint8_t subaddressSize, uint8_t *txBuff, uint8_t txBuffSize); status_t BOARD_I2C_Receive(I2C_Type *base, uint8_t deviceAddress, uint32_t subAddress, uint8_t subaddressSize, uint8_t *rxBuff, uint8_t rxBuffSize); void BOARD_Accel_I2C_Init(void); status_t BOARD_Accel_I2C_Send(uint8_t deviceAddress, uint32_t subAddress, uint8_t subaddressSize, uint32_t txBuff); status_t BOARD_Accel_I2C_Receive( uint8_t deviceAddress, uint32_t subAddress, uint8_t subaddressSize, uint8_t *rxBuff, uint8_t rxBuffSize); void BOARD_Codec_I2C_Init(void); status_t BOARD_Codec_I2C_Send( uint8_t deviceAddress, uint32_t subAddress, uint8_t subAddressSize, const uint8_t *txBuff, uint8_t txBuffSize); status_t BOARD_Codec_I2C_Receive( uint8_t deviceAddress, uint32_t subAddress, uint8_t subAddressSize, uint8_t *rxBuff, uint8_t rxBuffSize); #endif /* SDK_I2C_BASED_COMPONENT_USED */ #if defined(__cplusplus) } #endif /* __cplusplus */ #endif /* _BOARD_H_ */
4f3da0d91a060cd55b2d68f601e04ab4eb37fd3d
308f5596f1c7d382520cfce13ceaa5dff6f4f783
/third-party/fizz/src/fizz/third-party/libsodium-aegis/aegis128l/aead_aegis128l.h
d6b1d4be7ecc65782e9ece83953baa33c35a1eed
[ "PHP-3.01", "Zend-2.0", "MIT", "BSD-3-Clause", "ISC" ]
permissive
facebook/hhvm
7e200a309a1cad5304621b0516f781c689d07a13
d8203129dc7e7bf8639a2b99db596baad3d56b46
refs/heads/master
2023-09-04T04:44:12.892628
2023-09-04T00:43:05
2023-09-04T00:43:05
455,600
10,335
2,326
NOASSERTION
2023-09-14T21:24:04
2010-01-02T01:17:06
C++
UTF-8
C
false
false
1,924
h
aead_aegis128l.h
#ifndef fizz_aead_aegis128l_H #define fizz_aead_aegis128l_H #include <fizz/third-party/libsodium-aegis/private/state.h> typedef struct crypto_aead_aegis128l_implementation { int (*encrypt_detached)(unsigned char *c, unsigned char *mac, unsigned long long *maclen_p, const unsigned char *m, unsigned long long mlen, const unsigned char *ad, unsigned long long adlen, const unsigned char *nsec, const unsigned char *npub, const unsigned char *k); int (*decrypt_detached)(unsigned char *m, unsigned char *nsec, const unsigned char *c, unsigned long long clen, const unsigned char *mac, const unsigned char *ad, unsigned long long adlen, const unsigned char *npub, const unsigned char *k); } crypto_aead_aegis128l_implementation; typedef struct aegis128l_evp { int (*init_state)( const unsigned char* key, const unsigned char* nonce, fizz_aegis_evp_ctx* ctx); int (*aad_update)( const unsigned char* ad, unsigned long long adlen, fizz_aegis_evp_ctx *ctx); int (*aad_final) (fizz_aegis_evp_ctx* ctx); int (*encrypt_update)( unsigned char* c, unsigned long long* c_writtenlen_p, const unsigned char* m, unsigned long long mlen, fizz_aegis_evp_ctx* ctx); int (*encrypt_final)( unsigned char* c, unsigned long long* c_writtenlen_p, unsigned char *mac, fizz_aegis_evp_ctx* ctx); int (*decrypt_update)( unsigned char* m, unsigned long long* outlen, const unsigned char* c, unsigned long long clen, fizz_aegis_evp_ctx* ctx); int (*decrypt_final)( unsigned char* m, unsigned long long* outlen, const unsigned char* mac, fizz_aegis_evp_ctx* ctx); } aegis128l_evp; #endif
a30558aa0cd3d5f8d4a2571d3d670b3b7e94029a
7f6c235b0598353549959c18f69eefd20b766907
/src/z80asm/src/c/modlink.h
acf3e8517553540bee5b4dc28979891e1af8783e
[ "Artistic-2.0", "ClArtistic" ]
permissive
z88dk/z88dk
46dfd4905f36d99333173cadd0a660839befc9f0
8b07f37cc43c5d9ffe69b563c80763491d8faff7
refs/heads/master
2023-09-04T19:29:49.254958
2023-09-03T20:51:24
2023-09-03T20:51:24
54,035,569
820
263
NOASSERTION
2023-09-05T11:09:04
2016-03-16T13:48:16
Assembly
UTF-8
C
false
false
885
h
modlink.h
/* Z88DK Z80 Macro Assembler Copyright (C) Gunther Strube, InterLogic 1993-99 Copyright (C) Paulo Custodio, 2011-2023 License: The Artistic License 2.0, http://www.perlfoundation.org/artistic_license_2_0 Repository: https://github.com/z88dk/z88dk */ #pragma once #include "types.h" #include "expr1.h" #include "module1.h" #include "utlist.h" // append a library from the command line to the list to be linked void library_file_append(const char* filename); // append an object from the command line to the list to be linked bool object_file_check_append(const char* filename, Module1* module, bool reserve_space, bool no_errors); void object_file_append(const char* filename, Module1* module); void link_modules(void); void compute_equ_exprs(Expr1List *exprs, bool show_error, bool module_relative_addr); // call appmake if required by command line void checkrun_appmake(void);
15b87aa59d2ca7c2ca091e860bc38c13503b25fe
b1ae8b87081021c89062fdca46b8ee335756616b
/src/v0/encoder.h
5d66c4bc21f9c416d66159dc56c91e9de376d25e
[]
no_license
SimeonSimeonovIvanov/FOC-Servo
2547fe47c0c1518b6123dc0de32a7a11d884ddab
b0336597a9c05d79372d19d314280b50e61922d2
refs/heads/master
2022-07-11T09:15:46.136682
2022-07-03T15:49:32
2022-07-03T15:49:32
91,885,483
102
62
null
2017-06-09T20:27:23
2017-05-20T11:42:51
C
UTF-8
C
false
false
839
h
encoder.h
#ifndef __ENCODER_H__ #define __ENCODER_H__ #include "misc.h" #include "stm32f4xx_tim.h" #include "stm32f4xx_rcc.h" #include "stm32f4xx_gpio.h" #include "stm32f4xx_exti.h" #include "stm32f4xx_syscfg.h" #define ROTOR_ENCODER_PERIOD ( 4095 ) // TIM3->ARR #define foc_deg_to_rad( deg ) ( (float)deg * ( 3.14159265359f / 180.0f ) ) void initEncoder(void); void encoderInitZ(void); void initHall(void); uint16_t read360(void); uint16_t read360uvw(void); uint16_t read360uvwWithOffset( int16_t offset ); uint16_t readRawEncoderWithUVW(void); uint16_t initSanyoWareSaveEncoder(void); uint16_t readSanyoWareSaveEncoder(void); uint16_t readHallMap( void ); uint16_t readRawHallInput(void); float fSinAngle(int angle); float fCosAngle(int angle); void createSinCosTable(void); int32_t iEncoderGetAbsPos(void); // TIM2 ( 32 bits ) #endif
2f8c02b3cda01886180e3fb8fddbd5002553940c
6a531e292af43d3e7aec6d3019e0333362afe454
/api/impl/cactusGlobalsPrivate.h
d31e2daf6570b84ec5df50f72eb7c74f6735b451
[ "MIT" ]
permissive
ComparativeGenomicsToolkit/cactus
2d4d891b6b3af0a22b64aba11f18a867a7666e58
41d99360cfa79ada5bdca307883c30c7fb59a06d
refs/heads/master
2023-09-01T20:38:37.550816
2023-09-01T14:47:06
2023-09-01T14:47:06
1,317,650
369
106
NOASSERTION
2023-09-05T20:27:44
2011-02-01T20:17:33
C
UTF-8
C
false
false
1,306
h
cactusGlobalsPrivate.h
/* * Copyright (C) 2009-2011 by Benedict Paten (benedictpaten@gmail.com) * * Released under the MIT license, see LICENSE.txt */ #ifndef CACTUS_GLOBALS_PRIVATE_H_ #define CACTUS_GLOBALS_PRIVATE_H_ #include <stdlib.h> #include <stdbool.h> #include <stdint.h> #include <assert.h> #include <limits.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdarg.h> #include <sys/stat.h> #include <sys/types.h> #include "CuTest.h" #include "sonLib.h" #include "commonC.h" #define NAME_STRING "%" PRIi64 "" #include "cactusGroup.h" #include "cactusGroupPrivate.h" #include "cactusBlock.h" #include "cactusSegment.h" #include "cactusSegmentPrivate.h" #include "cactusBlockPrivate.h" #include "cactusChain.h" #include "cactusChainPrivate.h" #include "cactusEnd.h" #include "cactusCap.h" #include "cactusCapPrivate.h" #include "cactusEndPrivate.h" #include "cactusEvent.h" #include "cactusEventPrivate.h" #include "cactusEventTree.h" #include "cactusEventTreePrivate.h" #include "cactusGlobals.h" #include "cactusLink.h" #include "cactusLinkPrivate.h" #include "cactusSequence.h" #include "cactusSequencePrivate.h" #include "cactusFlower.h" #include "cactusDisk.h" #include "cactusDiskPrivate.h" #include "cactusMisc.h" #include "cactusFlowerPrivate.h" #include "cactusTestCommon.h" #endif
d0888d69b22b890d669f8c913bdddcab214aaf5f
e814383d36a10839104efaa4df277996ab220fa3
/ompi/mca/part/base/part_base_prequest.h
676a5596b4fbc20d599562ede3b53f33a5bdc8b7
[ "mpich2", "BSD-3-Clause-Open-MPI" ]
permissive
open-mpi/ompi
a1d7483ae1d83dd8fd8ae3ee95e832e0a0ee04e3
1edfdb025c4450f694600083ad871cf06c8d45cd
refs/heads/main
2023-09-01T01:30:02.040705
2023-08-29T17:32:18
2023-08-29T17:32:18
24,107,001
2,008
973
NOASSERTION
2023-09-14T20:59:26
2014-09-16T16:08:30
C
UTF-8
C
false
false
3,072
h
part_base_prequest.h
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2016 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2020 Sandia National Laboratories. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ /** * @file */ #ifndef MCA_PART_BASE_REQUEST_H #define MCA_PART_BASE_REQUEST_H #include "ompi_config.h" #include "opal/class/opal_free_list.h" #include "ompi/communicator/communicator.h" #include "ompi/request/request.h" #include "opal/datatype/opal_convertor.h" BEGIN_C_DECLS /** * External list for the partitioned requests. */ OMPI_DECLSPEC extern opal_free_list_t mca_part_base_psend_requests; OMPI_DECLSPEC extern opal_free_list_t mca_part_base_precv_requests; typedef enum { MCA_PART_REQUEST_NULL, MCA_PART_REQUEST_PSEND, MCA_PART_REQUEST_PRECV } mca_part_base_request_type_t; /** * Base type for Partitioned P2P requests */ struct mca_part_base_prequest_t { ompi_request_t req_ompi; /**< base request */ volatile int32_t req_part_complete; /**< flag indicating if the pt-2-pt layer is done with this request */ volatile int32_t req_free_called; /**< flag indicating if the user has freed this request */ mca_part_base_request_type_t req_type; /**< MPI request type - used for test */ struct ompi_communicator_t *req_comm; /**< communicator pointer */ struct ompi_datatype_t *req_datatype; /**< pointer to data type */ opal_convertor_t req_convertor; /**< always need the convertor */ void *req_addr; /**< pointer to application buffer */ size_t req_parts; /**< number of partitions */ size_t req_count; /**< count of user datatype elements */ int32_t req_peer; /**< peer process - rank w/in this communicator */ int32_t req_tag; /**< user defined tag */ struct ompi_proc_t* req_proc; /**< peer process */ }; typedef struct mca_part_base_prequest_t mca_part_base_prequest_t; OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_part_base_prequest_t); END_C_DECLS #endif
7ca8327019329a19f00088614756af49c4052e19
9de0cec678bc4a3bec2b4adabef9f39ff5b4afac
/PWGLF/STRANGENESS/LambdaK0/macros/AddTaskExtractV0AODRun2.C
3a186aea0aeb7d5b4f6e541e17a8400526d274fb
[]
permissive
alisw/AliPhysics
91bf1bd01ab2af656a25ff10b25e618a63667d3e
5df28b2b415e78e81273b0d9bf5c1b99feda3348
refs/heads/master
2023-08-31T20:41:44.927176
2023-08-31T14:51:12
2023-08-31T14:51:12
61,661,378
129
1,150
BSD-3-Clause
2023-09-14T18:48:45
2016-06-21T19:31:29
C++
UTF-8
C
false
false
3,088
c
AddTaskExtractV0AODRun2.C
AliAnalysisTaskExtractV0AODRun2* AddTaskExtractV0AODRun2( Bool_t lSwitchLowE = kFALSE, Bool_t lSwitchSaveAllInvMasses = kFALSE) { // Creates, configures and attaches to the train a cascades check task. // Get the pointer to the existing analysis manager via the static access method. //============================================================================== AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); if (!mgr) { ::Error("AddTask2ExtractV0AOD", "No analysis manager to connect to."); return NULL; } // Check the analysis type using the event handlers connected to the analysis manager. //============================================================================== if (!mgr->GetInputEventHandler()) { ::Error("AddTask2ExtractV0AOD", "This task requires an input event handler"); return NULL; } TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" // Create and configure the task AliAnalysisTaskExtractV0AODRun2* taskv0extract = new AliAnalysisTaskExtractV0AODRun2("V0Extract_PbPb_AOD"); //Configuration taskv0extract -> SetIsNuclear ( kTRUE ); taskv0extract -> SetIsLowEnergyPP ( kFALSE ); taskv0extract -> SetUseOnTheFly ( kFALSE ); if(!lSwitchLowE) { taskv0extract -> SetTriggerMask ( "kINT7" ); } else { taskv0extract -> SetTriggerMask ( "kMB" ); } taskv0extract -> SetLowE ( lSwitchLowE ); taskv0extract -> SetSaveAllInvMasses ( lSwitchSaveAllInvMasses ); taskv0extract -> SetPreSelect ( kTRUE ); mgr->AddTask(taskv0extract); TString outputFileName = AliAnalysisManager::GetCommonFileName(); if (mgr->GetMCtruthEventHandler()) outputFileName.ReplaceAll(".root","_MC.root"); // outputFileName += ":PWG2CheckLambda"; //if (lCollidingSystems) outputFileName += "_AA_"; //outputFileName += "_PP"; // if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC"; //if(lMasterJobSessionFlag.Length()) outputFileName += lMasterJobSessionFlag.Data(); //Adjustments: two output files not allowed in the LEGO train framework at this moment Printf("Set OutputFileName : \n %s\n", outputFileName.Data() ); AliAnalysisDataContainer *coutputList = mgr->CreateContainer("clistV0", TList::Class(), AliAnalysisManager::kOutputContainer, outputFileName ); AliAnalysisDataContainer *coutputTree = mgr->CreateContainer("cTree", TTree::Class(), AliAnalysisManager::kOutputContainer, outputFileName ); //This one you should merge in file-resident ways... coutputTree->SetSpecialOutput(); mgr->ConnectInput( taskv0extract, 0, mgr->GetCommonInputContainer()); mgr->ConnectOutput(taskv0extract, 1, coutputList); mgr->ConnectOutput(taskv0extract, 2, coutputTree); return taskv0extract; }
c5d90add4b71a9a76acfbadf0b35033f316da5de
75196819c910f3fd523f1a4d28e5d0fe12570ab1
/src/bdb53/src/common/db_shash.c
3e21ceeeb25afae06fb3d97409527c6e5f90ad04
[ "BSD-3-Clause", "Sleepycat", "MIT" ]
permissive
gridcoin-community/Gridcoin-Research
889967579b5b05bcc3ae836697a0f173b5ae91ea
21414dd0f63c9a34060f7f762f08d1a52aeb9e87
refs/heads/development
2023-09-04T09:21:55.006935
2023-09-03T17:45:20
2023-09-03T17:45:20
23,332,350
292
117
MIT
2023-09-11T10:22:10
2014-08-25T23:41:04
HTML
UTF-8
C
false
false
3,314
c
db_shash.c
/*- * See the file LICENSE for redistribution information. * * Copyright (c) 1996, 2013 Oracle and/or its affiliates. All rights reserved. * * $Id$ */ #include "db_config.h" #include "db_int.h" /* * __db_tablesize -- * Choose a size for the hash table. * * PUBLIC: u_int32_t __db_tablesize __P((u_int32_t)); */ u_int32_t __db_tablesize(n_buckets) u_int32_t n_buckets; { /* * We try to be clever about how big we make the hash tables. Use a * prime number close to the "suggested" number of elements that will * be in the hash table. Use 32 as the minimum hash table size. * * Ref: Sedgewick, Algorithms in C, "Hash Functions" * * Up to ~250,000 buckets, we use powers of 2. After that, we slow * the rate of increase by half. For each choice, we then use a * nearby prime number as the hash value. * * If a terabyte is the maximum cache we'll see, and we assume there * are 10 1K buckets on each hash chain, then 107374182 is the maximum * number of buckets we'll ever need. * * We don't use the obvious static data structure because some C * compilers (and I use the term loosely), can't handle them. */ #define HASH_SIZE(power, prime) { \ if ((power) >= n_buckets) \ return (prime); \ } HASH_SIZE(32, 37); /* 2^5 */ HASH_SIZE(64, 67); /* 2^6 */ HASH_SIZE(128, 131); /* 2^7 */ HASH_SIZE(256, 257); /* 2^8 */ HASH_SIZE(512, 521); /* 2^9 */ HASH_SIZE(1024, 1031); /* 2^10 */ HASH_SIZE(2048, 2053); /* 2^11 */ HASH_SIZE(4096, 4099); /* 2^12 */ HASH_SIZE(8192, 8191); /* 2^13 */ HASH_SIZE(16384, 16381); /* 2^14 */ HASH_SIZE(32768, 32771); /* 2^15 */ HASH_SIZE(65536, 65537); /* 2^16 */ HASH_SIZE(131072, 131071); /* 2^17 */ HASH_SIZE(262144, 262147); /* 2^18 */ HASH_SIZE(393216, 393209); /* 2^18 + 2^18/2 */ HASH_SIZE(524288, 524287); /* 2^19 */ HASH_SIZE(786432, 786431); /* 2^19 + 2^19/2 */ HASH_SIZE(1048576, 1048573); /* 2^20 */ HASH_SIZE(1572864, 1572869); /* 2^20 + 2^20/2 */ HASH_SIZE(2097152, 2097169); /* 2^21 */ HASH_SIZE(3145728, 3145721); /* 2^21 + 2^21/2 */ HASH_SIZE(4194304, 4194301); /* 2^22 */ HASH_SIZE(6291456, 6291449); /* 2^22 + 2^22/2 */ HASH_SIZE(8388608, 8388617); /* 2^23 */ HASH_SIZE(12582912, 12582917); /* 2^23 + 2^23/2 */ HASH_SIZE(16777216, 16777213); /* 2^24 */ HASH_SIZE(25165824, 25165813); /* 2^24 + 2^24/2 */ HASH_SIZE(33554432, 33554393); /* 2^25 */ HASH_SIZE(50331648, 50331653); /* 2^25 + 2^25/2 */ HASH_SIZE(67108864, 67108859); /* 2^26 */ HASH_SIZE(100663296, 100663291); /* 2^26 + 2^26/2 */ HASH_SIZE(134217728, 134217757); /* 2^27 */ HASH_SIZE(201326592, 201326611); /* 2^27 + 2^27/2 */ HASH_SIZE(268435456, 268435459); /* 2^28 */ HASH_SIZE(402653184, 402653189); /* 2^28 + 2^28/2 */ HASH_SIZE(536870912, 536870909); /* 2^29 */ HASH_SIZE(805306368, 805306357); /* 2^29 + 2^29/2 */ HASH_SIZE(1073741824, 1073741827); /* 2^30 */ return (1073741827); } /* * __db_hashinit -- * Initialize a hash table that resides in shared memory. * * PUBLIC: void __db_hashinit __P((void *, u_int32_t)); */ void __db_hashinit(begin, nelements) void *begin; u_int32_t nelements; { u_int32_t i; SH_TAILQ_HEAD(hash_head) *headp; headp = (struct hash_head *)begin; for (i = 0; i < nelements; i++, headp++) SH_TAILQ_INIT(headp); }
86460016d80eb7cb88ad8062f8de54b51abb9228
7eaf54a78c9e2117247cb2ab6d3a0c20719ba700
/SOFTWARE/A64-TERES/linux-a64/drivers/s390/net/smsgiucv.c
d8f990b6b332c62f41c90b747347c71f56ef1709
[ "Linux-syscall-note", "GPL-2.0-only", "GPL-1.0-or-later", "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
OLIMEX/DIY-LAPTOP
ae82f4ee79c641d9aee444db9a75f3f6709afa92
a3fafd1309135650bab27f5eafc0c32bc3ca74ee
refs/heads/rel3
2023-08-04T01:54:19.483792
2023-04-03T07:18:12
2023-04-03T07:18:12
80,094,055
507
92
Apache-2.0
2023-04-03T07:05:59
2017-01-26T07:25:50
C
UTF-8
C
false
false
6,391
c
smsgiucv.c
/* * IUCV special message driver * * Copyright IBM Corp. 2003, 2009 * * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <linux/module.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/device.h> #include <linux/slab.h> #include <net/iucv/iucv.h> #include <asm/cpcmd.h> #include <asm/ebcdic.h> #include "smsgiucv.h" struct smsg_callback { struct list_head list; const char *prefix; int len; void (*callback)(const char *from, char *str); }; MODULE_AUTHOR ("(C) 2003 IBM Corporation by Martin Schwidefsky (schwidefsky@de.ibm.com)"); MODULE_DESCRIPTION ("Linux for S/390 IUCV special message driver"); static struct iucv_path *smsg_path; /* dummy device used as trigger for PM functions */ static struct device *smsg_dev; static DEFINE_SPINLOCK(smsg_list_lock); static LIST_HEAD(smsg_list); static int iucv_path_connected; static int smsg_path_pending(struct iucv_path *, u8 ipvmid[8], u8 ipuser[16]); static void smsg_message_pending(struct iucv_path *, struct iucv_message *); static struct iucv_handler smsg_handler = { .path_pending = smsg_path_pending, .message_pending = smsg_message_pending, }; static int smsg_path_pending(struct iucv_path *path, u8 ipvmid[8], u8 ipuser[16]) { if (strncmp(ipvmid, "*MSG ", 8) != 0) return -EINVAL; /* Path pending from *MSG. */ return iucv_path_accept(path, &smsg_handler, "SMSGIUCV ", NULL); } static void smsg_message_pending(struct iucv_path *path, struct iucv_message *msg) { struct smsg_callback *cb; unsigned char *buffer; unsigned char sender[9]; int rc, i; buffer = kmalloc(msg->length + 1, GFP_ATOMIC | GFP_DMA); if (!buffer) { iucv_message_reject(path, msg); return; } rc = iucv_message_receive(path, msg, 0, buffer, msg->length, NULL); if (rc == 0) { buffer[msg->length] = 0; EBCASC(buffer, msg->length); memcpy(sender, buffer, 8); sender[8] = 0; /* Remove trailing whitespace from the sender name. */ for (i = 7; i >= 0; i--) { if (sender[i] != ' ' && sender[i] != '\t') break; sender[i] = 0; } spin_lock(&smsg_list_lock); list_for_each_entry(cb, &smsg_list, list) if (strncmp(buffer + 8, cb->prefix, cb->len) == 0) { cb->callback(sender, buffer + 8); break; } spin_unlock(&smsg_list_lock); } kfree(buffer); } int smsg_register_callback(const char *prefix, void (*callback)(const char *from, char *str)) { struct smsg_callback *cb; cb = kmalloc(sizeof(struct smsg_callback), GFP_KERNEL); if (!cb) return -ENOMEM; cb->prefix = prefix; cb->len = strlen(prefix); cb->callback = callback; spin_lock_bh(&smsg_list_lock); list_add_tail(&cb->list, &smsg_list); spin_unlock_bh(&smsg_list_lock); return 0; } void smsg_unregister_callback(const char *prefix, void (*callback)(const char *from, char *str)) { struct smsg_callback *cb, *tmp; spin_lock_bh(&smsg_list_lock); cb = NULL; list_for_each_entry(tmp, &smsg_list, list) if (tmp->callback == callback && strcmp(tmp->prefix, prefix) == 0) { cb = tmp; list_del(&cb->list); break; } spin_unlock_bh(&smsg_list_lock); kfree(cb); } static int smsg_pm_freeze(struct device *dev) { #ifdef CONFIG_PM_DEBUG printk(KERN_WARNING "smsg_pm_freeze\n"); #endif if (smsg_path && iucv_path_connected) { iucv_path_sever(smsg_path, NULL); iucv_path_connected = 0; } return 0; } static int smsg_pm_restore_thaw(struct device *dev) { int rc; #ifdef CONFIG_PM_DEBUG printk(KERN_WARNING "smsg_pm_restore_thaw\n"); #endif if (smsg_path && !iucv_path_connected) { memset(smsg_path, 0, sizeof(*smsg_path)); smsg_path->msglim = 255; smsg_path->flags = 0; rc = iucv_path_connect(smsg_path, &smsg_handler, "*MSG ", NULL, NULL, NULL); #ifdef CONFIG_PM_DEBUG if (rc) printk(KERN_ERR "iucv_path_connect returned with rc %i\n", rc); #endif if (!rc) iucv_path_connected = 1; cpcmd("SET SMSG IUCV", NULL, 0, NULL); } return 0; } static const struct dev_pm_ops smsg_pm_ops = { .freeze = smsg_pm_freeze, .thaw = smsg_pm_restore_thaw, .restore = smsg_pm_restore_thaw, }; static struct device_driver smsg_driver = { .owner = THIS_MODULE, .name = SMSGIUCV_DRV_NAME, .bus = &iucv_bus, .pm = &smsg_pm_ops, }; static void __exit smsg_exit(void) { cpcmd("SET SMSG IUCV", NULL, 0, NULL); device_unregister(smsg_dev); iucv_unregister(&smsg_handler, 1); driver_unregister(&smsg_driver); } static int __init smsg_init(void) { int rc; if (!MACHINE_IS_VM) { rc = -EPROTONOSUPPORT; goto out; } rc = driver_register(&smsg_driver); if (rc != 0) goto out; rc = iucv_register(&smsg_handler, 1); if (rc) goto out_driver; smsg_path = iucv_path_alloc(255, 0, GFP_KERNEL); if (!smsg_path) { rc = -ENOMEM; goto out_register; } rc = iucv_path_connect(smsg_path, &smsg_handler, "*MSG ", NULL, NULL, NULL); if (rc) goto out_free_path; else iucv_path_connected = 1; smsg_dev = kzalloc(sizeof(struct device), GFP_KERNEL); if (!smsg_dev) { rc = -ENOMEM; goto out_free_path; } dev_set_name(smsg_dev, "smsg_iucv"); smsg_dev->bus = &iucv_bus; smsg_dev->parent = iucv_root; smsg_dev->release = (void (*)(struct device *))kfree; smsg_dev->driver = &smsg_driver; rc = device_register(smsg_dev); if (rc) goto out_put; cpcmd("SET SMSG IUCV", NULL, 0, NULL); return 0; out_put: put_device(smsg_dev); out_free_path: iucv_path_free(smsg_path); smsg_path = NULL; out_register: iucv_unregister(&smsg_handler, 1); out_driver: driver_unregister(&smsg_driver); out: return rc; } module_init(smsg_init); module_exit(smsg_exit); MODULE_LICENSE("GPL"); EXPORT_SYMBOL(smsg_register_callback); EXPORT_SYMBOL(smsg_unregister_callback);
aebf2a47c44d02579784629cd92c6bbf05648a07
7df190df28da7e4ff166e55dc8ce780f11236a9f
/src/router/upnp/include/upnp_util.h
ff2eb37578b58f4641856911a8358b3e8393c997
[]
no_license
mirror/dd-wrt
25416946e6132aa54b35809de61834a1825a9a36
8f2934a5a2adfbb59b471375aa3a38de5d036531
refs/heads/master
2023-08-31T14:54:47.496685
2023-08-30T17:40:54
2023-08-30T17:40:54
7,470,282
520
281
null
2023-05-29T20:56:24
2013-01-06T17:21:29
null
UTF-8
C
false
false
2,183
h
upnp_util.h
/* * Broadcom UPnP module utilities include file * * Copyright (C) 2008, Broadcom Corporation * All Rights Reserved. * * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation; * the contents of this file may not be disclosed to third parties, copied * or duplicated in any form, in whole or in part, without the prior * written permission of Broadcom Corporation. * * $Id: upnp_util.h,v 1.7 2008/06/19 06:22:26 Exp $ */ #ifndef __UPNP_UTIL_H__ #define __UPNP_UTIL_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define UPNP_STR(value) (value)->val.str #define UPNP_BOOL(value) (value)->val.bool2 #define UPNP_I1(value) (value)->val.i1 #define UPNP_I2(value) (value)->val.i2 #define UPNP_I4(value) (value)->val.i4 #define UPNP_UI1(value) (value)->val.ui1 #define UPNP_UI2(value) (value)->val.ui2 #define UPNP_UI4(value) (value)->val.ui4 #define UPNP_BIN_LEN(value) (value)->len #define UPNP_BIN_DATA(value) (value)->val.data #define ARG_VALUE(arg) (&(arg)->value) #define ARG_STR(arg) (arg)->value.val.str #define ARG_BOOL(arg) (arg)->value.val.bool2 #define ARG_I1(arg) (arg)->value.val.i1 #define ARG_I2(arg) (arg)->value.val.i2 #define ARG_I4(arg) (arg)->value.val.i4 #define ARG_UI1(arg) (arg)->value.val.ui1 #define ARG_UI2(arg) (arg)->value.val.ui2 #define ARG_UI4(arg) (arg)->value.val.ui4 #define ARG_BIN_LEN(arg) (arg)->value.len #define ARG_BIN_DATA(arg) (arg)->value.val.data /* Functions */ int convert_value(UPNP_CONTEXT *context, UPNP_VALUE *value); void translate_value(UPNP_CONTEXT *context, UPNP_VALUE *value); int gmt_time(char *time_buf); IN_ARGUMENT *upnp_get_in_argument ( IN_ARGUMENT *arguments, char *arg_name ); OUT_ARGUMENT *upnp_get_out_argument ( OUT_ARGUMENT *arguments, char *arg_name ); void upnp_host_addr(unsigned char *host_addr, struct in_addr ipaddr, unsigned short port); #define UPNP_USE_HINT(a...) #define UPNP_CONST_HINT(a) #define UPNP_IN_HINT(a) #define UPNP_OUT_HINT(a) #define UPNP_IN_ARG(a) upnp_get_in_argument(in_argument, a) #define UPNP_OUT_ARG(a) upnp_get_out_argument(out_argument, a) #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __UPNP_UTIL_H__ */
63aa19791fdef4ac80143b3904ec8063c22901cc
a11e4bdd6157b22067288d860507fa20abea033d
/src/modules/places/e_mod_places.h
f75b160f87dac72d00f3398a738a8d2805866fbb
[ "BSD-2-Clause" ]
permissive
JeffHoogland/moksha
85a0f39dc97daa61d35e64a511013d21552db288
c56013644d8cd8e32101bb38a8d1e4ebd9d47f37
refs/heads/master
2023-08-24T05:39:13.415948
2023-08-22T19:49:32
2023-08-22T19:49:32
34,704,822
179
51
NOASSERTION
2023-09-06T14:41:31
2015-04-28T02:59:19
C
UTF-8
C
false
false
1,779
h
e_mod_places.h
#ifndef E_MOD_PLACES_H #define E_MOD_PLACES_H typedef enum { MOUNT_OP_NONE, MOUNT_OP_MOUNT, MOUNT_OP_UMOUNT, MOUNT_OP_EJECT } Mount_Op; typedef struct _Volume Volume; struct _Volume { const char *id; int perc_backup; const char *label; const char *icon; const char *device; const char *mount_point; const char *fstype; unsigned long long size; unsigned long long free_space; Eina_Bool mounted; const char *bus; const char *drive_type; const char *model; const char *vendor; const char *serial; Eina_Bool removable; Eina_Bool requires_eject; Eina_Bool media_available; Eina_Bool remote; Eina_Bool unlocked; Eina_Bool encrypted; Eina_Bool valid; Eina_Bool to_mount; Eina_Bool force_open; Eina_List *objs; void (*mount_func)(Volume *vol, Eina_List *opts); void (*unmount_func)(Volume *vol, Eina_List *opts); void (*eject_func)(Volume *vol, Eina_List *opts); void (*free_func)(Volume *vol); void *backend_data; }; void places_init(void); void places_shutdown(void); Volume *places_volume_add(const char *id, Eina_Bool first_time); void places_volume_del(Volume *v); void places_volume_update(Volume *vol); Volume *places_volume_by_id_get(const char *id); Eina_List *places_volume_list_get(void); void places_volume_mount(Volume *vol); void places_volume_unmount(Volume *vol); void places_volume_eject(Volume *vol); Evas_Object *places_main_obj_create(Evas *canvas); void places_update_all_gadgets(void); void places_fill_box(Evas_Object *box, Eina_Bool horiz); void places_empty_box(Evas_Object *box); void places_print_volume(Volume *v); void places_generate_menu(void *data __UNUSED__,E_Menu *em); void places_augmentation(void *data __UNUSED__, E_Menu *em); #endif
7bf63fbdd51609cd08230b3d58ff0422e9365ebc
376e1818d427b5e4d32fa6dd6c7b71e9fd88afdb
/www/epiphany/patches/patch-lib_ephy-sync-utils.c
0b18ee3a953b153d1bebb51b0401cf7a730f225f
[]
no_license
NetBSD/pkgsrc
a0732c023519650ef821ab89c23ab6ab59e25bdb
d042034ec4896cc5b47ed6f2e5b8802d9bc5c556
refs/heads/trunk
2023-09-01T07:40:12.138283
2023-09-01T05:25:19
2023-09-01T05:25:19
88,439,572
321
138
null
2023-07-12T22:34:14
2017-04-16T20:04:15
null
UTF-8
C
false
false
765
c
patch-lib_ephy-sync-utils.c
$NetBSD: patch-lib_ephy-sync-utils.c,v 1.2 2022/03/10 21:28:03 prlw1 Exp $ NetBSD does not have getrandom(). --- lib/ephy-sync-utils.c.orig 2021-12-21 00:24:23.810496800 +0000 +++ lib/ephy-sync-utils.c @@ -32,7 +32,7 @@ #include <string.h> #if defined(__linux__) #include <sys/random.h> -#elif defined(__FreeBSD__) || defined(__OpenBSD__) +#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) #include <unistd.h> #endif @@ -187,7 +187,7 @@ ephy_sync_utils_generate_random_bytes (v if (getentropy (out, num_bytes) == -1) { g_error ("Failed to get entropy: %s", g_strerror (errno)); } -#else +#elif !defined(__NetBSD__) do { ret = getrandom (out, num_bytes, 0); } while (ret < (gssize)num_bytes && errno == EINTR);
3753d892a11eb7a604d15f5aebd0f7306b6c1a50
0dd85c72c457ac317ecdde7dc40518f7be1a2602
/vendor/platform/Fibocom-MA510/src/port_crypto_default/boatplatform_internal.c
c7edd1cda1d2bb9dbf87108e0716244397df7600
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
aitos-io/BoAT-X-Framework
00072acd6e570b8dda5c3e211103717110303915
92c09bd1ed269903b542b7b39a02137bb0b4f9be
refs/heads/master
2023-07-08T11:20:52.441231
2023-03-08T01:43:57
2023-03-08T01:43:57
249,309,472
2,165
141
Apache-2.0
2023-06-27T03:22:02
2020-03-23T01:39:16
C
UTF-8
C
false
false
24,374
c
boatplatform_internal.c
/****************************************************************************** * Copyright (C) 2018-2021 aitos.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *****************************************************************************/ /*!@brief platform internal interface @file boatplatform_internal.c contains platform internal interface functions. */ //! self header include #include "boatconfig.h" #include "boatplatform_internal.h" #include "boattypes.h" #include "persiststore.h" #include "boatkeystore.h" #include "rand.h" #include "aes/aes.h" #include "sha3.h" #include "secp256k1.h" #include "nist256p1.h" #include "bignum.h" #include <string.h> /* net releated include */ #if (PROTOCOL_USE_HLFABRIC == 1) #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <arpa/inet.h> #endif #include <sys/time.h> // fibocom include #include "qapi_fibocom.h" #include "qapi_fs.h" #include "locale.h" #if (PROTOCOL_USE_HLFABRIC == 1) #if (BOAT_HLFABRIC_TLS_SUPPORT == 1) // for TTLSContext structure #include "http2intf.h" #endif #endif /* #if (PROTOCOL_USE_HLFABRIC == 1) */ #define GENERATE_KEY_REPEAT_TIMES 100 #define BoAT_DIR_PATH_ROOT "/datatx/dir_boat" uint32_t random32(void) { qapi_Status_t status; uint16_t randBuf[2]={0}; uint32_t rand32; status = qapi_fibo_random_data_get(2,randBuf); if(status != QAPI_OK) { BoatLog(BOAT_LOG_CRITICAL, "Fail to get random data."); return 0; } memcpy(&rand32,randBuf,4); return rand32; } BOAT_RESULT BoatRandom(BUINT8 *output, BUINT32 outputLen, void *rsvd) { BOAT_RESULT result = BOAT_SUCCESS; qapi_Status_t status; (void)rsvd; if(outputLen <= 20u) { uint16 randBuf[20]={0}; status = qapi_fibo_random_data_get((uint16)outputLen,randBuf); if(status != QAPI_OK) { BoatLog(BOAT_LOG_CRITICAL, "Fail to get random data."); result=BOAT_ERROR; goto end; } memcpy(output,randBuf,outputLen); } else { uint16 *randHeapBuf = NULL; randHeapBuf=BoatMalloc(outputLen); if(randHeapBuf == NULL) { BoatLog(BOAT_LOG_CRITICAL, "Fail to allocate random buffer."); return BOAT_ERROR_COMMON_OUT_OF_MEMORY; } status = qapi_fibo_random_data_get((uint16)outputLen,randHeapBuf); if(status != QAPI_OK) { BoatLog(BOAT_LOG_CRITICAL, "Fail to get random data."); result=BOAT_ERROR; BoatFree(randHeapBuf); goto end; } memcpy(output,randHeapBuf,outputLen); BoatFree(randHeapBuf); } end: return result; } BOAT_RESULT BoatSignature(BoatKeypairPriKeyCtx prikeyCtx, const BUINT8 *digest, BUINT32 digestLen, BoatSignatureResult *signatureResult, void *rsvd) { BUINT8 signature[64] = {0}; BUINT8 signatureTmp[139]; BUINT32 signatureTmpLen = 0; BUINT8 ecdsPrefix = 0; BUINT32 signatureLen = 0; BOAT_RESULT result = BOAT_SUCCESS; (void)rsvd; /* param check */ if ((digest == NULL) || (signatureResult == NULL)) { BoatLog(BOAT_LOG_CRITICAL, "parameter can't be NULL."); return BOAT_ERROR_COMMON_INVALID_ARGUMENT; } // result = BoAT_GetPirkeyByIndex(prikeyCtx.keypair_index,&prikey); // if(result != BOAT_SUCCESS){ // BoatLog(BOAT_LOG_CRITICAL, "get keypair prikey fail."); // return BOAT_ERROR; // } // result = BoAT_sign(prikeyCtx.prikey_type,prikeyCtx.prikey_format, prikey.value,prikey.value_len,digest,digestLen,signatureTmp,&signatureLen,&ecdsPrefix); result = BoAT_Keystore_Sign(prikeyCtx.prikey_type, prikeyCtx.keypair_index, digest, digestLen, signature, &signatureLen, &ecdsPrefix); if (result != BOAT_SUCCESS) { return result; } // // signature result assign // memset(signatureResult, 0, sizeof(BoatSignatureResult)); // signatureResult->native_format_used = true; // memcpy(signatureResult->native_sign, signatureTmp, 64); // signatureResult->signPrefix_used = true; // signatureResult->signPrefix = ecdsPrefix; /* convert r,s to asn.1 */ result = utility_signature_to_asn1(signature, signatureLen, signatureTmp, &signatureTmpLen); if (result != BOAT_SUCCESS) { BoatLog(BOAT_LOG_CRITICAL, "signature to asn.1 fail."); return BOAT_ERROR; } // signature result assign memset(signatureResult, 0, sizeof(BoatSignatureResult)); signatureResult->pkcs_format_used = true; signatureResult->pkcs_sign_length = signatureTmpLen; memcpy(signatureResult->pkcs_sign, signatureTmp, signatureResult->pkcs_sign_length); signatureResult->native_format_used = true; memcpy(&signatureResult->native_sign[0], signature, 64); signatureResult->signPrefix_used = true; signatureResult->signPrefix = ecdsPrefix; return result; } /****************************************************************************** BOAT FILE OPERATION WARPPER *******************************************************************************/ #define S_IFDIR 0040000 /**< Directory */ #define S_IFMT 0170000 /**< Mask of all values */ #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) /* @func fibocom_efs_is_dir_exists @brief find the path is a directory or directory is exist */ int fibocom_efs_is_dir_exists(const char *path) { int result, ret_val = 0; struct qapi_FS_Stat_Type_s sbuf; memset (&sbuf, 0, sizeof (sbuf)); result = qapi_FS_Stat(path, &sbuf); if (result != 0) goto End; if (S_ISDIR (sbuf.st_Mode) == 1) ret_val = 1; End: return ret_val; } BOAT_RESULT BoatGetFileSize(const BCHAR *fileName, BUINT32 *size, void *rsvd) { qapi_FS_Status_t status = QAPI_OK; int fd = -1; qapi_FS_Offset_t seek_status = 0; int fNameLen = 0; int fullPathNameLen = 0; BCHAR *fullFilePath = NULL; fNameLen = strlen(fileName); fullPathNameLen = strlen((char *)BoAT_DIR_PATH_ROOT)+1+fNameLen; /// MUST SETTING setlocale(LC_ALL, "C"); /// <locale.h> if(fullPathNameLen < 200) { BCHAR fullFileName[200]={0}; strcat(fullFileName,BoAT_DIR_PATH_ROOT); strcat(fullFileName,"/"); strcat(fullFileName,fileName); status = qapi_FS_Open(fullFileName, QAPI_FS_O_RDONLY_E, &fd); } else { fullFilePath=BoatMalloc(fullPathNameLen+1); if(fullFilePath == NULL) { BoatLog(BOAT_LOG_CRITICAL,"BoatMalloc ERROR!"); return BOAT_ERROR_COMMON_OUT_OF_MEMORY; } strcat(fullFilePath,BoAT_DIR_PATH_ROOT); strcat(fullFilePath,"/"); strcat(fullFilePath,fileName); status = qapi_FS_Open(fullFilePath, QAPI_FS_O_RDONLY_E, &fd); } if(fullFilePath) { BoatFree(fullFilePath); } if((status != QAPI_OK) && (-1 == fd)) { BoatLog(BOAT_LOG_CRITICAL, "Failed to open file: %s.", fileName); return BOAT_ERROR_STORAGE_FILE_OPEN_FAIL; } status = qapi_FS_Seek(fd, 0, QAPI_FS_SEEK_END_E, &seek_status); if(status != QAPI_OK) { BoatLog(BOAT_LOG_CRITICAL, "Failed to qapi_FS_Seek."); qapi_FS_Close(fd); return BOAT_ERROR_PERSISTER_READ_FAIL; } *size = (BUINT32)seek_status; qapi_FS_Close(fd); return BOAT_SUCCESS; } BOAT_RESULT BoatWriteStorage(BUINT32 offset, BUINT8 *writeBuf, BUINT32 writeLen, void *rsvd) { qapi_FS_Status_t status = QAPI_OK; int fd = -1; int wr_bytes = 0; (void)rsvd; int fNameLen=0; int fullPathNamelen=0; BCHAR *fullFilePath=NULL; BSINT32 count = 0; BUINT32 size = 0; BUINT8 *buf_zero = NULL; qapi_FS_Offset_t seek_status = 0; /// MUST SETTING setlocale(LC_ALL, "C"); /// <locale.h> ///create boat dir; if(fibocom_efs_is_dir_exists(BoAT_DIR_PATH_ROOT) != 1) { status = qapi_FS_Mk_Dir(BoAT_DIR_PATH_ROOT, 0677); BoatLog(BOAT_LOG_CRITICAL,"qapi_FS_Mk_Dir %d", status); } fNameLen = strlen(fileName); fullPathNamelen = strlen((char *)BoAT_DIR_PATH_ROOT)+1+fNameLen; if(fullPathNamelen < 200) { BCHAR fullFileName[200]={0}; strcat(fullFileName,BoAT_DIR_PATH_ROOT); strcat(fullFileName,"/"); strcat(fullFileName,BOAT_FILE_STOREDATA); } else { fullFilePath=BoatMalloc(fullPathNamelen+1); if(fullFilePath == NULL) { BoatLog(BOAT_LOG_CRITICAL,"BoatMalloc ERROR!"); return BOAT_ERROR_COMMON_OUT_OF_MEMORY; } strcat(fullFilePath,BoAT_DIR_PATH_ROOT); strcat(fullFilePath,"/"); strcat(fullFilePath,BOAT_FILE_STOREDATA); } BoatGetFileSize(fullFilePath,&size,NULL); status = qapi_FS_Open(fullFilePath, QAPI_FS_O_RDWR_E | QAPI_FS_O_CREAT_E, &fd); if(fullFilePath) { BoatFree(fullFilePath); } if((status != QAPI_OK) && (-1 == fd)) { BoatLog(BOAT_LOG_CRITICAL, "Failed to open file: %s.", fileName); return BOAT_ERROR_STORAGE_FILE_OPEN_FAIL; } /*move to the end of the file*/ BoatLog(BOAT_LOG_NORMAL, "size = %d , offset = %d ", size, offset); if (size < offset) { buf_zero = BoatMalloc(offset - size); if (NULL == buf_zero) { qapi_FS_Close(fd); return BOAT_ERROR_COMMON_OUT_OF_MEMORY; } memset(buf_zero, 0x00, offset - size); //count = fwrite(buf_zero, 1, offset - size, file_ptr); qapi_FS_Write(fd,buf_zero,offset - size,&count); BoatFree(buf_zero); if (count != (offset - size)) { //fclose(file_ptr); qapi_FS_Close(fd); BoatLog(BOAT_LOG_CRITICAL, "Failed to write file: %s.", BOAT_FILE_STOREDATA); return BOAT_ERROR_STORAGE_FILE_WRITE_FAIL; } //fseek(file_ptr, 0, SEEK_END); qapi_FS_Seek(fd,0,QAPI_FS_SEEK_END_E, &seek_status); } else { //fseek(file_ptr, offset, SEEK_SET); qapi_FS_Seek(fd,offset,QAPI_FS_SEEK_SET_E, &seek_status); } status = qapi_FS_Write(fd, writeBuf, writeLen, &wr_bytes); if(status != QAPI_OK) { BoatLog(BOAT_LOG_CRITICAL, "Failed to qapi_FS_Write."); qapi_FS_Close(fd); return BOAT_ERROR_STORAGE_FILE_WRITE_FAIL; } qapi_FS_Close(fd); if (wr_bytes != writeLen) { BoatLog(BOAT_LOG_CRITICAL, "Failed to write file: %s.", fileName); return BOAT_ERROR_PERSISTER_STORE_FAIL; } return BOAT_SUCCESS; } BOAT_RESULT BoatReadStorage(BUINT32 offset, BUINT8 *readBuf, BUINT32 readLen, void *rsvd) { qapi_FS_Status_t status = QAPI_OK; int fd = -1; int rd_bytes = 0; (void)rsvd; int fNameLen = 0; int fullPathNameLen = 0; BCHAR *fullFilePath = NULL; BSINT32 count = 0; BUINT32 size = 0; BUINT8 *buf_zero = NULL; fNameLen = strlen(fileName); fullPathNameLen = strlen((char *)BoAT_DIR_PATH_ROOT)+1+fNameLen; /// MUST SETTING setlocale(LC_ALL, "C"); /// <locale.h> if(fullPathNameLen < 200) { BCHAR fullFileName[200]={0}; strcat(fullFileName,BoAT_DIR_PATH_ROOT); strcat(fullFileName,"/"); strcat(fullFileName,BOAT_FILE_STOREDATA); } else { fullFilePath=BoatMalloc(fullPathNameLen+1); if(fullFilePath == NULL) { BoatLog(BOAT_LOG_CRITICAL,"BoatMalloc ERROR!"); return BOAT_ERROR_COMMON_OUT_OF_MEMORY; } strcat(fullFilePath,BoAT_DIR_PATH_ROOT); strcat(fullFilePath,"/"); strcat(fullFilePath,BOAT_FILE_STOREDATA); } BoatGetFileSize(fullFilePath,&size,NULL); status = qapi_FS_Open(fullFilePath, QAPI_FS_O_RDONLY_E, &fd); if(fullFilePath) { BoatFree(fullFilePath); } if((status != QAPI_OK) && (-1 == fd)) { BoatLog(BOAT_LOG_CRITICAL, "Failed to open file: %s.", fileName); return BOAT_ERROR_STORAGE_FILE_OPEN_FAIL; } if (readLen + offset > size) { qapi_FS_Close(fd); return BOAT_ERROR_STORAGE_FILE_READ_FAIL; } qapi_FS_Seek(fd,offset,QAPI_FS_SEEK_SET_E, &seek_status); status = qapi_FS_Read(fd, readBuf, readLen, &rd_bytes); if(status != QAPI_OK) { BoatLog(BOAT_LOG_CRITICAL, "Failed to qapi_FS_Read."); qapi_FS_Close(fd); return BOAT_ERROR_STORAGE_FILE_READ_FAIL; } qapi_FS_Close(fd); if (rd_bytes != readLen) { BoatLog(BOAT_LOG_CRITICAL, "Failed to read file: %s.", fileName); return BOAT_ERROR_PERSISTER_READ_FAIL; } return BOAT_SUCCESS; } BOAT_RESULT BoatRemoveFile(const BCHAR *fileName, void *rsvd) { (void)rsvd; if (fileName == NULL) { BoatLog(BOAT_LOG_CRITICAL, "param which 'fileName' can't be NULL."); return BOAT_ERROR_COMMON_INVALID_ARGUMENT; } int status = 0; int fNameLen = 0; int fullPathNameLen = 0; BCHAR *fullFilePath = NULL; fNameLen = strlen(fileName); fullPathNameLen = strlen((char *)BoAT_DIR_PATH_ROOT)+1+fNameLen; /// MUST SETTING setlocale(LC_ALL, "C"); /// <locale.h> if(fullPathNameLen < 200) { BCHAR fullFileName[200]={0}; strcat(fullFileName,BoAT_DIR_PATH_ROOT); strcat(fullFileName,"/"); strcat(fullFileName,fileName); status=qapi_FS_Unlink(fullFileName); } else { fullFilePath=BoatMalloc(fullPathNameLen+1); if(fullFilePath == NULL) { BoatLog(BOAT_LOG_CRITICAL,"BoatMalloc ERROR!"); return BOAT_ERROR_COMMON_OUT_OF_MEMORY; } strcat(fullFilePath,BoAT_DIR_PATH_ROOT); strcat(fullFilePath,"/"); strcat(fullFilePath,fileName); status=qapi_FS_Unlink(fullFilePath); } if(fullFilePath) { BoatFree(fullFilePath); } if(QAPI_OK != status) { return BOAT_ERROR_STORAGE_FILE_REMOVE_FAIL; } else { return BOAT_SUCCESS; } } #if (PROTOCOL_USE_HLFABRIC == 1) /****************************************************************************** BOAT SOCKET WARPPER THIS ONLY USED BY FABRIC *******************************************************************************/ BSINT32 BoatConnect(const BCHAR *address, void *rsvd) { int connectfd; char ip[64]; char port[8]; char *ptr = NULL; struct hostent *he; struct sockaddr_in server; struct sockaddr localaddr; struct sockaddr_in *localaddr_ptr; socklen_t addrlen = sizeof(struct sockaddr); (void)rsvd; ptr = strchr(address, ':'); if (NULL == ptr) { BoatLog(BOAT_LOG_CRITICAL, "invalid address:%s.", address); return -1; } memset(ip , 0 , sizeof(ip)); memset(port, 0 , sizeof(port)); memcpy(ip , address, (int)(ptr - address)); memcpy(port, ptr + 1, strlen(address) - (int)(ptr - address)); if ((he = gethostbyname(ip)) == NULL) { BoatLog(BOAT_LOG_CRITICAL, "gethostbyname() error"); return -1; } if ((connectfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { BoatLog(BOAT_LOG_CRITICAL, "socket() error"); return -1; } struct timeval timeout = {0, 500 * 1000}; setsockopt(connectfd, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, sizeof(struct timeval)); setsockopt(connectfd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(struct timeval)); memset(&server, 0, sizeof(server)); server.sin_family = AF_INET; server.sin_port = htons(atoi(port)); server.sin_addr = *((struct in_addr *)(he->h_addr_list[0])); if (connect(connectfd, (struct sockaddr *)&server,sizeof(struct sockaddr)) < 0) { BoatLog(BOAT_LOG_CRITICAL, "connect() error"); close(connectfd); return -1; } if (getsockname(connectfd, &localaddr, &addrlen) < 0) { BoatLog(BOAT_LOG_CRITICAL, "getsockname() error"); close(connectfd); return -1; } else { localaddr_ptr = (struct sockaddr_in*)&localaddr; BoatLog(BOAT_LOG_VERBOSE, "localIP: %s:%d.", inet_ntoa(localaddr_ptr->sin_addr), htons(localaddr_ptr->sin_port)); } BoatLog(BOAT_LOG_VERBOSE, "%s:%s[%d] connected!", ip, port, connectfd); return connectfd; } #if (BOAT_HLFABRIC_TLS_SUPPORT == 1) BOAT_RESULT BoatTlsInit(const BCHAR *hostName, const BoatFieldVariable *caChain, BSINT32 socketfd, void *tlsContext, void *rsvd) { //! @todo BoatTlsInit implementation in crypto default. return BOAT_ERROR; } #endif BSINT32 BoatSend(BSINT32 sockfd, void *tlsContext, const void *buf, size_t len, void *rsvd) { #if (BOAT_HLFABRIC_TLS_SUPPORT == 1) //! @todo BOAT_HLFABRIC_TLS_SUPPORT implementation in crypto default. return -1; #else return send(sockfd, buf, len, 0); #endif } BSINT32 BoatRecv(BSINT32 sockfd, void *tlsContext, void *buf, size_t len, void *rsvd) { #if (BOAT_HLFABRIC_TLS_SUPPORT == 1) //! @todo BOAT_HLFABRIC_TLS_SUPPORT implementation in crypto default. return -1; #else return recv(sockfd, buf, len, 0); #endif } void BoatClose(BSINT32 sockfd, void *tlsContext, void *rsvd) { close(sockfd); #if (BOAT_HLFABRIC_TLS_SUPPORT == 1) // free tls releated //! @todo BOAT_HLFABRIC_TLS_SUPPORT implementation in crypto default. #endif } #endif /* #if (PROTOCOL_USE_HLFABRIC == 1) */ /****************************************************************************** BOAT KEY PROCESS WARPPER *******************************************************************************/ static BOAT_RESULT sBoatPort_keyCreate_internal_generation(const BoatKeypairPriKeyCtx_config *config, BoatKeypairDataCtx *pkCtx) { BOAT_RESULT result = BOAT_SUCCESS; BoatKeypairKeypair keypair; // result = BoAT_Keypair_generation(config->prikey_type,config->prikey_format,&keypair); result = BoAT_Keystore_Gen_Keypair(config->prikey_type, &keypair); if (result != BOAT_SUCCESS) { BoatLog(BOAT_LOG_CRITICAL, "generate private key failed."); return result; } // 2- update private key format pkCtx->prikeyCtx.prikey_format = BOAT_KEYPAIR_PRIKEY_FORMAT_NATIVE; // 3- update private key type pkCtx->prikeyCtx.prikey_type = config->prikey_type; pkCtx->extraData.value_len = keypair.prikey.value_len; memcpy(pkCtx->extraData.value, keypair.prikey.value, keypair.prikey.value_len); memcpy(pkCtx->prikeyCtx.pubkey_content, keypair.pubkey.value, 64); return result; } static BOAT_RESULT sBoatPort_keyCreate_external_injection_native(const BoatKeypairPriKeyCtx_config *config, BoatKeypairDataCtx *pkCtx) { BUINT32 len = 0; BOAT_RESULT result = BOAT_SUCCESS; // 0- check input parameter if ((config == NULL) || (config->prikey_content.field_ptr == NULL) || (pkCtx == NULL)) { BoatLog(BOAT_LOG_CRITICAL, "input parameter can not be NULL."); return BOAT_ERROR_COMMON_INVALID_ARGUMENT; } // 1- update private key if (config->prikey_content.field_len > sizeof(pkCtx->extraData.value)) { BoatLog(BOAT_LOG_CRITICAL, "Error: length of injection key is too long."); return BOAT_ERROR_COMMON_OUT_OF_MEMORY; } memcpy(pkCtx->extraData.value, config->prikey_content.field_ptr, config->prikey_content.field_len); pkCtx->extraData.value_len = config->prikey_content.field_len; // 2- update private key format pkCtx->prikeyCtx.prikey_format = BOAT_KEYPAIR_PRIKEY_FORMAT_NATIVE; // 3- update private key type pkCtx->prikeyCtx.prikey_type = config->prikey_type; // 4- update private key index // 5- update public key result = BoAT_getPubkey(config->prikey_type, config->prikey_format, pkCtx->extraData.value, pkCtx->extraData.value_len, pkCtx->prikeyCtx.pubkey_content, &len); return result; } static BOAT_RESULT sBoatPort_keyCreate_external_injection_pkcs(const BoatKeypairPriKeyCtx_config *config, BoatKeypairDataCtx *pkCtx) { // BUINT8 pubKey65[65] = {0}; BOAT_RESULT result = BOAT_SUCCESS; KeypairNative keypair; // 0- check input parameter if ((config == NULL) || (config->prikey_content.field_ptr == NULL) || (pkCtx == NULL)) { BoatLog(BOAT_LOG_CRITICAL, "input parameter can not be NULL."); return BOAT_ERROR_COMMON_INVALID_ARGUMENT; } // 1- update private key if (config->prikey_content.field_len > sizeof(pkCtx->extraData.value)) { BoatLog(BOAT_LOG_CRITICAL, "Error: length of injection key is too long."); return BOAT_ERROR_COMMON_OUT_OF_MEMORY; } result = UtilityPKCS2Native((BCHAR *)(config->prikey_content.field_ptr), &keypair); if (result != BOAT_SUCCESS) { BoatLog(BOAT_LOG_NORMAL, ">>>>>>>>>> UtilityPKCS2Native err."); UtilityFreeKeypair(keypair); return result; } // memcpy(pkCtx->extra_data.value, config->prikey_content.field_ptr, config->prikey_content.field_len); // pkCtx->extra_data.value_len = config->prikey_content.field_len; memcpy(pkCtx->extraData.value, keypair.prikey, keypair.prikeylen); pkCtx->extraData.value_len = keypair.prikeylen; // 2- update private key format pkCtx->prikeyCtx.prikey_format = BOAT_KEYPAIR_PRIKEY_FORMAT_NATIVE; // 3- update private key type pkCtx->prikeyCtx.prikey_type = config->prikey_type; // 4- update private key index // This field should update by 'key secure storage'(such as TE/SE). // When algorithms are implemented by software, this field is default to 0, means // that ignore this field. // 5- update public key // if (config->prikey_type == BOAT_KEYPAIR_PRIKEY_TYPE_SECP256K1) // { // ecdsa_get_public_key65(&secp256k1, pkCtx->extra_data.value, pubKey65); // memcpy(pkCtx->pubkey_content, &pubKey65[1], 64); // } // else if (config->prikey_type == BOAT_KEYPAIR_PRIKEY_TYPE_SECP256R1) // { // ecdsa_get_public_key65(&nist256p1, pkCtx->extra_data.value, pubKey65); // memcpy(pkCtx->pubkey_content, &pubKey65[1], 64); // } // else // { // BoatLog( BOAT_LOG_CRITICAL, "Invalid private key type." ); // result = BOAT_ERROR_WALLET_KEY_TYPE_ERR; // } memcpy(pkCtx->prikeyCtx.pubkey_content, keypair.pubkey, keypair.pubkeylen); UtilityFreeKeypair(keypair); return result; } BOAT_RESULT BoatPort_keyCreate(const BoatKeypairPriKeyCtx_config *config, BoatKeypairDataCtx *pkCtx) { BOAT_RESULT result = BOAT_SUCCESS; if ((config == NULL) || (pkCtx == NULL)) { BoatLog(BOAT_LOG_CRITICAL, "parameter can't be NULL."); return BOAT_ERROR_COMMON_INVALID_ARGUMENT; } BoatLog(BOAT_LOG_NORMAL, "prikey_genMode = %d .", config->prikey_genMode); if (config->prikey_genMode == BOAT_KEYPAIR_PRIKEY_GENMODE_INTERNAL_GENERATION) { BoatLog(BOAT_LOG_VERBOSE, "The private key is generated internally..."); result = sBoatPort_keyCreate_internal_generation(config, pkCtx); } else if (config->prikey_genMode == BOAT_KEYPAIR_PRIKEY_GENMODE_EXTERNAL_INJECTION) { BoatLog(BOAT_LOG_NORMAL, "prikey_format = %d .", config->prikey_format); switch (config->prikey_format) { case BOAT_KEYPAIR_PRIKEY_FORMAT_PKCS: BoatLog(BOAT_LOG_NORMAL, "keypair private key[pkcs] set..."); // result = BOAT_ERROR_kEYPAIR_KEY_FORMAT_ERR; result = sBoatPort_keyCreate_external_injection_pkcs(config, pkCtx); break; case BOAT_KEYPAIR_PRIKEY_FORMAT_NATIVE: BoatLog(BOAT_LOG_VERBOSE, "keypair private key[native] set..."); result = sBoatPort_keyCreate_external_injection_native(config, pkCtx); break; case BOAT_KEYPAIR_PRIKEY_FORMAT_MNEMONIC: BoatLog(BOAT_LOG_NORMAL, "NOT SUPPORT FORMAT YET."); result = BOAT_ERROR_KEYPAIR_KEY_FORMAT_ERR; break; default: BoatLog(BOAT_LOG_CRITICAL, "Invalid private key format."); result = BOAT_ERROR_KEYPAIR_KEY_FORMAT_ERR; break; } } else { BoatLog(BOAT_LOG_CRITICAL, "Invalid private key format."); result = BOAT_ERROR_KEYPAIR_KEY_GENMODE_ERR; } return result; } BOAT_RESULT BoatPort_keyQuery(const BoatWalletPriKeyCtx_config *config, BoatWalletPriKeyCtx *pkCtx) { //! @todo return BOAT_ERROR; } BOAT_RESULT BoatPort_keyDelete(BoatWalletPriKeyCtx *pkCtx) { //! @todo return BOAT_ERROR; } /****************************************************************************** BOAT AES WARPPER *******************************************************************************/ BOAT_RESULT BoatAesEncrypt(BUINT8 iv[16], const BUINT8 *key, const BUINT8 *input, size_t length, BUINT8 *output) { aes_encrypt_ctx ctxe; BUINT8 saltArrayTmp[16]; BOAT_RESULT result = BOAT_SUCCESS; /* aes init */ result += aes_encrypt_key128(key, &ctxe); /* use saltArrayTmp because function aes_cbc_encrypt(...) will modify this field */ memcpy(saltArrayTmp, iv, 16); /* encrypt process */ result += aes_cbc_encrypt(input, output, length, saltArrayTmp, &ctxe); return result; } BOAT_RESULT BoatAesDecrypt(BUINT8 iv[16], const BUINT8 *key, const BUINT8 *input, size_t length, BUINT8 *output) { aes_decrypt_ctx ctxd; BOAT_RESULT result = BOAT_SUCCESS; /* aes init */ result += aes_decrypt_key128(key, &ctxd); /* decrypt process */ result += aes_cbc_decrypt(input, output, length, iv, &ctxd); return result; }