/* Generated by Pyrex 0.9.4.1 on Fri Jan 12 09:07:00 2007 */

#include "Python.h"
#include "structmember.h"
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
__PYX_EXTERN_C double pow(double, double);
#include "const_types.h"
#include "clamav.h"
#include "string.h"


typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
static PyObject *__Pyx_UnpackItem(PyObject *, int); /*proto*/
static int __Pyx_EndUnpack(PyObject *, int); /*proto*/
static int __Pyx_PrintItem(PyObject *); /*proto*/
static int __Pyx_PrintNewline(void); /*proto*/
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static void __Pyx_ReRaise(void); /*proto*/
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
static PyObject *__Pyx_GetExcValue(void); /*proto*/
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/
static void __Pyx_WriteUnraisable(char *name); /*proto*/
static void __Pyx_AddTraceback(char *funcname); /*proto*/
static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size);  /*proto*/
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/
static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static PyObject *__pyx_m;
static PyObject *__pyx_b;
static int __pyx_lineno;
static char *__pyx_filename;
static char **__pyx_f;

static char __pyx_mdoc[] = "\nlibclamav, version 1.0.1\n \n(c) 2003-2006 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n";

/* Declarations from libclamav */


struct __pyx_obj_9libclamav_clamav {
  PyObject_HEAD
  struct cl_node (*root);
  int virnum;
  char (*virname);
  PyObject *status;
  unsigned long size;
  struct cl_limits limits;
  struct cl_stat dbstat;
  PyObject *dirname;
};

static PyTypeObject *__pyx_ptype_9libclamav_clamav = 0;
static PyObject *__pyx_k3;
static PyObject *__pyx_k4;
static PyObject *__pyx_k5;
static PyObject *__pyx_k6;
static PyObject *__pyx_k7;
static PyObject *__pyx_k8;
static PyObject *__pyx_k9;
static PyObject *__pyx_k10;
static PyObject *__pyx_k11;

/* Implementation of libclamav */


static PyObject *__pyx_n_CL_CLEAN;
static PyObject *__pyx_n_CL_VIRUS;
static PyObject *__pyx_n_CL_EMAXREC;
static PyObject *__pyx_n_CL_EMAXSIZE;
static PyObject *__pyx_n_CL_EMAXFILES;
static PyObject *__pyx_n_CL_ERAR;
static PyObject *__pyx_n_CL_EZIP;
static PyObject *__pyx_n_CL_EMALFZIP;
static PyObject *__pyx_n_CL_EGZIP;
static PyObject *__pyx_n_CL_EBZIP;
static PyObject *__pyx_n_CL_EOLE2;
static PyObject *__pyx_n_CL_EMSCOMP;
static PyObject *__pyx_n_CL_EMSCAB;
static PyObject *__pyx_n_CL_EACCES;
static PyObject *__pyx_n_CL_ENULLARG;
static PyObject *__pyx_n_CL_ETMPFILE;
static PyObject *__pyx_n_CL_EFSYNC;
static PyObject *__pyx_n_CL_EMEM;
static PyObject *__pyx_n_CL_EOPEN;
static PyObject *__pyx_n_CL_EMALFDB;
static PyObject *__pyx_n_CL_EPATSHORT;
static PyObject *__pyx_n_CL_ETMPDIR;
static PyObject *__pyx_n_CL_ECVD;
static PyObject *__pyx_n_CL_ECVDEXTR;
static PyObject *__pyx_n_CL_EMD5;
static PyObject *__pyx_n_CL_EDSIG;
static PyObject *__pyx_n_CL_EIO;
static PyObject *__pyx_n_CL_EFORMAT;
static PyObject *__pyx_n_CL_SCAN_RAW;
static PyObject *__pyx_n_CL_SCAN_ARCHIVE;
static PyObject *__pyx_n_CL_SCAN_MAIL;
static PyObject *__pyx_n_CL_SCAN_DISABLERAR;
static PyObject *__pyx_n_CL_SCAN_OLE2;
static PyObject *__pyx_n_CL_SCAN_BLOCKENCRYPTED;
static PyObject *__pyx_n_CL_SCAN_HTML;
static PyObject *__pyx_n_CL_SCAN_PE;
static PyObject *__pyx_n_CL_SCAN_BLOCKBROKEN;
static PyObject *__pyx_n_CL_SCAN_MAILURL;
static PyObject *__pyx_n_CL_SCAN_BLOCKMAX;
static PyObject *__pyx_n_CL_SCAN_DEFAULT;
static PyObject *__pyx_n_CL_RAW;
static PyObject *__pyx_n_CL_ARCHIVE;
static PyObject *__pyx_n_CL_MAIL;
static PyObject *__pyx_n_CL_DISABLERAR;
static PyObject *__pyx_n_CL_OLE2;
static PyObject *__pyx_n_CL_ENCRYPTED;
static PyObject *__pyx_n_CL_DEFAULT;
static PyObject *__pyx_n_ClamAVError;
static PyObject *__pyx_n_Exception;

static PyObject *__pyx_n_statinidir;
static PyObject *__pyx_n_loaddbdir;

static int __pyx_f_9libclamav_6clamav___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_9libclamav_6clamav___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dirname = 0;
  int __pyx_v_ret;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {"dirname",0};
  __pyx_v_dirname = __pyx_k3;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_dirname)) return -1;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_dirname);

  /* "/tmp/sagator/libclamav/libclamav.pyx":121 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virnum = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":122 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":123 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_statinidir); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
  Py_INCREF(__pyx_v_dirname);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_dirname);
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":124 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loaddbdir); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; goto __pyx_L1;}
  Py_INCREF(__pyx_v_dirname);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_dirname);
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":125 */
  memset((&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits),0,(sizeof(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits)));

  /* "/tmp/sagator/libclamav/libclamav.pyx":126 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.maxreclevel = 8;

  /* "/tmp/sagator/libclamav/libclamav.pyx":127 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.maxmailrec = 64;

  /* "/tmp/sagator/libclamav/libclamav.pyx":128 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.maxfilesize = 10485760;

  /* "/tmp/sagator/libclamav/libclamav.pyx":129 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.maxfiles = 1024;

  /* "/tmp/sagator/libclamav/libclamav.pyx":130 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.maxratio = 250;

  /* "/tmp/sagator/libclamav/libclamav.pyx":131 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.archivememlim = 1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("libclamav.clamav.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_dirname);
  return __pyx_r;
}

static PyObject *__pyx_n_statfree;
static PyObject *__pyx_n_freetrie;

static PyObject *__pyx_f_9libclamav_6clamav___del__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav___del__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/tmp/sagator/libclamav/libclamav.pyx":133 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_statfree); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; goto __pyx_L1;}
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":134 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_freetrie); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;}
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("libclamav.clamav.__del__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_9libclamav_6clamav_retver(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_retver(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/tmp/sagator/libclamav/libclamav.pyx":136 */
  __pyx_1 = PyString_FromString(cl_retver()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  __Pyx_AddTraceback("libclamav.clamav.retver");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_9libclamav_6clamav_freetrie(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_freetrie(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/tmp/sagator/libclamav/libclamav.pyx":138 */
  cl_freetrie(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root);

  /* "/tmp/sagator/libclamav/libclamav.pyx":139 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":140 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virnum = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("libclamav.clamav.freetrie");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_ckeckstatus;
static PyObject *__pyx_n_checkstatus;

static PyObject *__pyx_f_9libclamav_6clamav_loaddb(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_loaddb(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dirname = 0;
  PyObject *__pyx_r;
  char (*__pyx_1);
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  static char *__pyx_argnames[] = {"dirname",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_dirname)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_dirname);

  /* "/tmp/sagator/libclamav/libclamav.pyx":142 */
  __pyx_1 = PyString_AsString(__pyx_v_dirname); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}
  __pyx_2 = PyInt_FromLong(cl_loaddb(__pyx_1,(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root),(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virnum))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_2;
  __pyx_2 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":143 */
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ckeckstatus); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; goto __pyx_L1;}
  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_4); __pyx_4 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":144 */
  __pyx_2 = PyInt_FromLong(cl_buildtrie(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_2;
  __pyx_2 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":145 */
  __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_checkstatus); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; goto __pyx_L1;}
  __pyx_4 = PyTuple_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("libclamav.clamav.loaddb");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_dirname);
  return __pyx_r;
}

static PyObject *__pyx_k12p;

static char (__pyx_k12[]) = "No signatures loaded!";

static PyObject *__pyx_f_9libclamav_6clamav_loaddbdir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_loaddbdir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dirname = 0;
  PyObject *__pyx_r;
  int __pyx_1;
  char (*__pyx_2);
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  static char *__pyx_argnames[] = {"dirname",0};
  __pyx_v_dirname = __pyx_k4;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_dirname)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_dirname);

  /* "/tmp/sagator/libclamav/libclamav.pyx":147 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_dirname); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; goto __pyx_L1;}
  if (__pyx_1) {

    /* "/tmp/sagator/libclamav/libclamav.pyx":148 */
    __pyx_2 = PyString_AsString(__pyx_v_dirname); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;}
    __pyx_3 = PyInt_FromLong(cl_loaddbdir(__pyx_2,(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root),(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virnum))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;}
    Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
    ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/tmp/sagator/libclamav/libclamav.pyx":150 */
    __pyx_3 = PyInt_FromLong(cl_loaddbdir(cl_retdbdir(),(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root),(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virnum))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; goto __pyx_L1;}
    Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
    ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_3;
    __pyx_3 = 0;
  }
  __pyx_L2:;

  /* "/tmp/sagator/libclamav/libclamav.pyx":151 */
  __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_checkstatus); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;}
  __pyx_4 = PyTuple_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;}
  __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  Py_DECREF(__pyx_5); __pyx_5 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":152 */
  __pyx_1 = (((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virnum == 0);
  if (__pyx_1) {

    /* "/tmp/sagator/libclamav/libclamav.pyx":153 */
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_ClamAVError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;}
    __Pyx_Raise(__pyx_3, __pyx_k12p, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/tmp/sagator/libclamav/libclamav.pyx":154 */
  __pyx_4 = PyInt_FromLong(cl_buildtrie(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_4;
  __pyx_4 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":155 */
  __pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_checkstatus); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; goto __pyx_L1;}
  __pyx_4 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; goto __pyx_L1;}
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_4); __pyx_4 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("libclamav.clamav.loaddbdir");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_dirname);
  return __pyx_r;
}

static PyObject *__pyx_n_strerror;

static PyObject *__pyx_f_9libclamav_6clamav_checkstatus(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_checkstatus(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ret = 0;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  static char *__pyx_argnames[] = {"ret",0};
  __pyx_v_ret = __pyx_k5;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_ret)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_ret);

  /* "/tmp/sagator/libclamav/libclamav.pyx":157 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_CL_CLEAN); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;}
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_CL_VIRUS); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;}
  __pyx_3 = PyList_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;}
  PyList_SET_ITEM(__pyx_3, 0, __pyx_1);
  PyList_SET_ITEM(__pyx_3, 1, __pyx_2);
  __pyx_1 = 0;
  __pyx_2 = 0;
  __pyx_4 = PySequence_Contains(__pyx_3, ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  if (__pyx_4) {

    /* "/tmp/sagator/libclamav/libclamav.pyx":158 */
    Py_INCREF(__pyx_v_ret);
    __pyx_r = __pyx_v_ret;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/tmp/sagator/libclamav/libclamav.pyx":160 */
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ClamAVError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; goto __pyx_L1;}
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_strerror); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; goto __pyx_L1;}
    __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __Pyx_Raise(__pyx_1, __pyx_5, 0);
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; goto __pyx_L1;}
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("libclamav.clamav.checkstatus");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_ret);
  return __pyx_r;
}

static PyObject *__pyx_n_len;

static char (__pyx_k13[]) = "";

static PyObject *__pyx_f_9libclamav_6clamav_scanbuff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_scanbuff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_buff = 0;
  PyObject *__pyx_r;
  char (*__pyx_1);
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  unsigned int __pyx_5;
  static char *__pyx_argnames[] = {"buff",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buff)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_buff);

  /* "/tmp/sagator/libclamav/libclamav.pyx":162 */
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virname = __pyx_k13;

  /* "/tmp/sagator/libclamav/libclamav.pyx":163 */
  __pyx_1 = PyString_AsString(__pyx_v_buff); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; goto __pyx_L1;}
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; goto __pyx_L1;}
  Py_INCREF(__pyx_v_buff);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_buff);
  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  __pyx_2 = PyInt_FromLong(cl_scanbuff(__pyx_1,__pyx_5,((constchar (*(*)))(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virname)),((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_2;
  __pyx_2 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":165 */
  __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_checkstatus); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; goto __pyx_L1;}
  __pyx_4 = PyString_FromString(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virname); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
  __pyx_4 = 0;
  __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_r = __pyx_4;
  __pyx_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("libclamav.clamav.scanbuff");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_buff);
  return __pyx_r;
}

static char (__pyx_k14[]) = "";

static PyObject *__pyx_f_9libclamav_6clamav_scandesc(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_scandesc(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_desc = 0;
  PyObject *__pyx_v_options = 0;
  PyObject *__pyx_r;
  long __pyx_1;
  char (*__pyx_2);
  int __pyx_3;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  static char *__pyx_argnames[] = {"desc","options",0};
  __pyx_v_options = __pyx_k6;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_desc, &__pyx_v_options)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_desc);
  Py_INCREF(__pyx_v_options);

  /* "/tmp/sagator/libclamav/libclamav.pyx":167 */
  __pyx_1 = 0;
  __pyx_2 = __pyx_k14;
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->size = __pyx_1;
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virname = __pyx_2;

  /* "/tmp/sagator/libclamav/libclamav.pyx":168 */
  __pyx_3 = PyInt_AsLong(__pyx_v_desc); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;}
  __pyx_4 = PyInt_AsLong(__pyx_v_options); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;}
  __pyx_5 = PyInt_FromLong(cl_scandesc(__pyx_3,((constchar (*(*)))(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virname)),(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->size),((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root,(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits),__pyx_4)); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_5;
  __pyx_5 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":170 */
  __pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_checkstatus); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; goto __pyx_L1;}
  __pyx_6 = PyString_FromString(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virname); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; goto __pyx_L1;}
  __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_7, 0, __pyx_6);
  __pyx_6 = 0;
  __pyx_6 = PyObject_CallObject(__pyx_5, __pyx_7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; goto __pyx_L1;}
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  Py_DECREF(__pyx_7); __pyx_7 = 0;
  __pyx_r = __pyx_6;
  __pyx_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  __Pyx_AddTraceback("libclamav.clamav.scandesc");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_desc);
  Py_DECREF(__pyx_v_options);
  return __pyx_r;
}

static char (__pyx_k15[]) = "";

static PyObject *__pyx_f_9libclamav_6clamav_scanfile(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_scanfile(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_options = 0;
  PyObject *__pyx_r;
  long __pyx_1;
  char (*__pyx_2);
  int __pyx_3;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  static char *__pyx_argnames[] = {"filename","options",0};
  __pyx_v_options = __pyx_k7;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_filename, &__pyx_v_options)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_filename);
  Py_INCREF(__pyx_v_options);

  /* "/tmp/sagator/libclamav/libclamav.pyx":172 */
  __pyx_1 = 0;
  __pyx_2 = __pyx_k15;
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->size = __pyx_1;
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virname = __pyx_2;

  /* "/tmp/sagator/libclamav/libclamav.pyx":173 */
  __pyx_2 = PyString_AsString(__pyx_v_filename); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;}
  __pyx_3 = PyInt_AsLong(__pyx_v_options); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;}
  __pyx_4 = PyInt_FromLong(cl_scanfile(__pyx_2,((constchar (*(*)))(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virname)),(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->size),((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->root,(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits),__pyx_3)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_4;
  __pyx_4 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":175 */
  __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_checkstatus); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;}
  __pyx_5 = PyString_FromString(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->virname); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;}
  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5);
  __pyx_5 = 0;
  __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  Py_DECREF(__pyx_6); __pyx_6 = 0;
  __pyx_r = __pyx_5;
  __pyx_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  __Pyx_AddTraceback("libclamav.clamav.scanfile");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_filename);
  Py_DECREF(__pyx_v_options);
  return __pyx_r;
}

static PyObject *__pyx_f_9libclamav_6clamav_statinidir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_statinidir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dirname = 0;
  PyObject *__pyx_r;
  int __pyx_1;
  char (*__pyx_2);
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  static char *__pyx_argnames[] = {"dirname",0};
  __pyx_v_dirname = __pyx_k8;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_dirname)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_dirname);

  /* "/tmp/sagator/libclamav/libclamav.pyx":177 */
  Py_INCREF(__pyx_v_dirname);
  Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dirname);
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dirname = __pyx_v_dirname;

  /* "/tmp/sagator/libclamav/libclamav.pyx":178 */
  memset((&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dbstat),0,(sizeof(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dbstat)));

  /* "/tmp/sagator/libclamav/libclamav.pyx":179 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_dirname); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
  if (__pyx_1) {

    /* "/tmp/sagator/libclamav/libclamav.pyx":180 */
    __pyx_2 = PyString_AsString(__pyx_v_dirname); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;}
    __pyx_3 = PyInt_FromLong(cl_statinidir(__pyx_2,(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dbstat))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;}
    Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
    ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/tmp/sagator/libclamav/libclamav.pyx":182 */
    __pyx_3 = PyInt_FromLong(cl_statinidir(cl_retdbdir(),(&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dbstat))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;}
    Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
    ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_3;
    __pyx_3 = 0;
  }
  __pyx_L2:;

  /* "/tmp/sagator/libclamav/libclamav.pyx":183 */
  __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_checkstatus); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
  __pyx_4 = PyTuple_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
  __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  Py_DECREF(__pyx_5); __pyx_5 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("libclamav.clamav.statinidir");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_dirname);
  return __pyx_r;
}

static PyObject *__pyx_f_9libclamav_6clamav_statchkdir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_statchkdir(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/tmp/sagator/libclamav/libclamav.pyx":185 */
  __pyx_1 = PyInt_FromLong(cl_statchkdir((&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dbstat))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_1;
  __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":186 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_checkstatus); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;}
  Py_INCREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
  PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("libclamav.clamav.statchkdir");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_9libclamav_6clamav_statfree(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_statfree(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/tmp/sagator/libclamav/libclamav.pyx":188 */
  __pyx_1 = PyInt_FromLong(cl_statfree((&((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dbstat))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status);
  ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status = __pyx_1;
  __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":189 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_checkstatus); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;}
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("libclamav.clamav.statfree");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_9libclamav_6clamav_strerror(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_strerror(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_clerror = 0;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  static char *__pyx_argnames[] = {"clerror",0};
  __pyx_v_clerror = __pyx_k9;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_clerror)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_clerror);

  /* "/tmp/sagator/libclamav/libclamav.pyx":191 */
  if (PyObject_Cmp(__pyx_v_clerror, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;}
  __pyx_1 = __pyx_1 == 0;
  if (__pyx_1) {

    /* "/tmp/sagator/libclamav/libclamav.pyx":192 */
    __pyx_1 = PyInt_AsLong(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->status); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;}
    __pyx_2 = PyString_FromString(cl_strerror(__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/tmp/sagator/libclamav/libclamav.pyx":194 */
    __pyx_1 = PyInt_AsLong(__pyx_v_clerror); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;}
    __pyx_2 = PyString_FromString(cl_strerror(__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("libclamav.clamav.strerror");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_clerror);
  return __pyx_r;
}

static PyObject *__pyx_n_statchkdir;

static PyObject *__pyx_f_9libclamav_6clamav_reload(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_reload(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dirname = 0;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  static char *__pyx_argnames[] = {"dirname",0};
  __pyx_v_dirname = __pyx_k10;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_dirname)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_dirname);

  /* "/tmp/sagator/libclamav/libclamav.pyx":196 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_dirname); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;}
  if (__pyx_1) {

    /* "/tmp/sagator/libclamav/libclamav.pyx":197 */
    Py_INCREF(__pyx_v_dirname);
    Py_DECREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dirname);
    ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dirname = __pyx_v_dirname;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/tmp/sagator/libclamav/libclamav.pyx":198 */
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_statchkdir); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; goto __pyx_L1;}
  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_1 = PyObject_IsTrue(__pyx_4); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (__pyx_1) {

    /* "/tmp/sagator/libclamav/libclamav.pyx":199 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_statfree); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;}
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;

    /* "/tmp/sagator/libclamav/libclamav.pyx":200 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_freetrie); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;}
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;

    /* "/tmp/sagator/libclamav/libclamav.pyx":201 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_statinidir); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
    Py_INCREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dirname);
    PyTuple_SET_ITEM(__pyx_3, 0, ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dirname);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;

    /* "/tmp/sagator/libclamav/libclamav.pyx":202 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loaddbdir); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
    Py_INCREF(((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dirname);
    PyTuple_SET_ITEM(__pyx_3, 0, ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->dirname);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;

    /* "/tmp/sagator/libclamav/libclamav.pyx":203 */
    __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/tmp/sagator/libclamav/libclamav.pyx":205 */
    __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
    __pyx_r = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("libclamav.clamav.reload");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_dirname);
  return __pyx_r;
}

static PyObject *__pyx_n_items;
static PyObject *__pyx_n_maxreclevel;
static PyObject *__pyx_n_maxmailrec;
static PyObject *__pyx_n_maxfiles;
static PyObject *__pyx_n_maxratio;
static PyObject *__pyx_n_archivememlim;
static PyObject *__pyx_n_maxfilesize;


static PyObject *__pyx_f_9libclamav_6clamav_setlimits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9libclamav_6clamav_setlimits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_key;
  PyObject *__pyx_v_value;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  int __pyx_5;
  short __pyx_6;
  long __pyx_7;
  static char *__pyx_argnames[] = {"args",0};
  __pyx_v_args = __pyx_k11;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_args)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_args);
  __pyx_v_key = Py_None; Py_INCREF(Py_None);
  __pyx_v_value = Py_None; Py_INCREF(Py_None);

  /* "/tmp/sagator/libclamav/libclamav.pyx":207 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_args, __pyx_n_items); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_1 = PyObject_GetIter(__pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  for (;;) {
    __pyx_L2:;
    __pyx_2 = PyIter_Next(__pyx_1);
    if (!__pyx_2) {
      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
      break;
    }
    __pyx_3 = __Pyx_UnpackItem(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
    Py_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_3;
    __pyx_3 = 0;
    __pyx_4 = __Pyx_UnpackItem(__pyx_2, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
    Py_DECREF(__pyx_v_value);
    __pyx_v_value = __pyx_4;
    __pyx_4 = 0;
    if (__Pyx_EndUnpack(__pyx_2, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/tmp/sagator/libclamav/libclamav.pyx":208 */
    if (PyObject_Cmp(__pyx_v_key, __pyx_n_maxreclevel, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;}
    __pyx_5 = __pyx_5 == 0;
    if (__pyx_5) {

      /* "/tmp/sagator/libclamav/libclamav.pyx":209 */
      __pyx_5 = PyInt_AsLong(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;}
      ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.maxreclevel = __pyx_5;
      goto __pyx_L4;
    }
    if (PyObject_Cmp(__pyx_v_key, __pyx_n_maxmailrec, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;}
    __pyx_5 = __pyx_5 == 0;
    if (__pyx_5) {

      /* "/tmp/sagator/libclamav/libclamav.pyx":211 */
      __pyx_5 = PyInt_AsLong(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;}
      ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.maxmailrec = __pyx_5;
      goto __pyx_L4;
    }
    if (PyObject_Cmp(__pyx_v_key, __pyx_n_maxfiles, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;}
    __pyx_5 = __pyx_5 == 0;
    if (__pyx_5) {

      /* "/tmp/sagator/libclamav/libclamav.pyx":213 */
      __pyx_5 = PyInt_AsLong(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
      ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.maxfiles = __pyx_5;
      goto __pyx_L4;
    }
    if (PyObject_Cmp(__pyx_v_key, __pyx_n_maxratio, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
    __pyx_5 = __pyx_5 == 0;
    if (__pyx_5) {

      /* "/tmp/sagator/libclamav/libclamav.pyx":215 */
      __pyx_5 = PyInt_AsLong(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
      ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.maxratio = __pyx_5;
      goto __pyx_L4;
    }
    if (PyObject_Cmp(__pyx_v_key, __pyx_n_archivememlim, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; goto __pyx_L1;}
    __pyx_5 = __pyx_5 == 0;
    if (__pyx_5) {

      /* "/tmp/sagator/libclamav/libclamav.pyx":217 */
      __pyx_6 = PyInt_AsLong(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;}
      ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.archivememlim = __pyx_6;
      goto __pyx_L4;
    }
    if (PyObject_Cmp(__pyx_v_key, __pyx_n_maxfilesize, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
    __pyx_5 = __pyx_5 == 0;
    if (__pyx_5) {

      /* "/tmp/sagator/libclamav/libclamav.pyx":219 */
      __pyx_7 = PyInt_AsLong(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;}
      ((struct __pyx_obj_9libclamav_clamav *)__pyx_v_self)->limits.maxfilesize = __pyx_7;
      goto __pyx_L4;
    }
    __pyx_L4:;
  }
  __pyx_L3:;
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("libclamav.clamav.setlimits");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_key);
  Py_DECREF(__pyx_v_value);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_args);
  return __pyx_r;
}

static __Pyx_InternTabEntry __pyx_intern_tab[] = {
  {&__pyx_n_CL_ARCHIVE, "CL_ARCHIVE"},
  {&__pyx_n_CL_CLEAN, "CL_CLEAN"},
  {&__pyx_n_CL_DEFAULT, "CL_DEFAULT"},
  {&__pyx_n_CL_DISABLERAR, "CL_DISABLERAR"},
  {&__pyx_n_CL_EACCES, "CL_EACCES"},
  {&__pyx_n_CL_EBZIP, "CL_EBZIP"},
  {&__pyx_n_CL_ECVD, "CL_ECVD"},
  {&__pyx_n_CL_ECVDEXTR, "CL_ECVDEXTR"},
  {&__pyx_n_CL_EDSIG, "CL_EDSIG"},
  {&__pyx_n_CL_EFORMAT, "CL_EFORMAT"},
  {&__pyx_n_CL_EFSYNC, "CL_EFSYNC"},
  {&__pyx_n_CL_EGZIP, "CL_EGZIP"},
  {&__pyx_n_CL_EIO, "CL_EIO"},
  {&__pyx_n_CL_EMALFDB, "CL_EMALFDB"},
  {&__pyx_n_CL_EMALFZIP, "CL_EMALFZIP"},
  {&__pyx_n_CL_EMAXFILES, "CL_EMAXFILES"},
  {&__pyx_n_CL_EMAXREC, "CL_EMAXREC"},
  {&__pyx_n_CL_EMAXSIZE, "CL_EMAXSIZE"},
  {&__pyx_n_CL_EMD5, "CL_EMD5"},
  {&__pyx_n_CL_EMEM, "CL_EMEM"},
  {&__pyx_n_CL_EMSCAB, "CL_EMSCAB"},
  {&__pyx_n_CL_EMSCOMP, "CL_EMSCOMP"},
  {&__pyx_n_CL_ENCRYPTED, "CL_ENCRYPTED"},
  {&__pyx_n_CL_ENULLARG, "CL_ENULLARG"},
  {&__pyx_n_CL_EOLE2, "CL_EOLE2"},
  {&__pyx_n_CL_EOPEN, "CL_EOPEN"},
  {&__pyx_n_CL_EPATSHORT, "CL_EPATSHORT"},
  {&__pyx_n_CL_ERAR, "CL_ERAR"},
  {&__pyx_n_CL_ETMPDIR, "CL_ETMPDIR"},
  {&__pyx_n_CL_ETMPFILE, "CL_ETMPFILE"},
  {&__pyx_n_CL_EZIP, "CL_EZIP"},
  {&__pyx_n_CL_MAIL, "CL_MAIL"},
  {&__pyx_n_CL_OLE2, "CL_OLE2"},
  {&__pyx_n_CL_RAW, "CL_RAW"},
  {&__pyx_n_CL_SCAN_ARCHIVE, "CL_SCAN_ARCHIVE"},
  {&__pyx_n_CL_SCAN_BLOCKBROKEN, "CL_SCAN_BLOCKBROKEN"},
  {&__pyx_n_CL_SCAN_BLOCKENCRYPTED, "CL_SCAN_BLOCKENCRYPTED"},
  {&__pyx_n_CL_SCAN_BLOCKMAX, "CL_SCAN_BLOCKMAX"},
  {&__pyx_n_CL_SCAN_DEFAULT, "CL_SCAN_DEFAULT"},
  {&__pyx_n_CL_SCAN_DISABLERAR, "CL_SCAN_DISABLERAR"},
  {&__pyx_n_CL_SCAN_HTML, "CL_SCAN_HTML"},
  {&__pyx_n_CL_SCAN_MAIL, "CL_SCAN_MAIL"},
  {&__pyx_n_CL_SCAN_MAILURL, "CL_SCAN_MAILURL"},
  {&__pyx_n_CL_SCAN_OLE2, "CL_SCAN_OLE2"},
  {&__pyx_n_CL_SCAN_PE, "CL_SCAN_PE"},
  {&__pyx_n_CL_SCAN_RAW, "CL_SCAN_RAW"},
  {&__pyx_n_CL_VIRUS, "CL_VIRUS"},
  {&__pyx_n_ClamAVError, "ClamAVError"},
  {&__pyx_n_Exception, "Exception"},
  {&__pyx_n_archivememlim, "archivememlim"},
  {&__pyx_n_checkstatus, "checkstatus"},
  {&__pyx_n_ckeckstatus, "ckeckstatus"},
  {&__pyx_n_freetrie, "freetrie"},
  {&__pyx_n_items, "items"},
  {&__pyx_n_len, "len"},
  {&__pyx_n_loaddbdir, "loaddbdir"},
  {&__pyx_n_maxfiles, "maxfiles"},
  {&__pyx_n_maxfilesize, "maxfilesize"},
  {&__pyx_n_maxmailrec, "maxmailrec"},
  {&__pyx_n_maxratio, "maxratio"},
  {&__pyx_n_maxreclevel, "maxreclevel"},
  {&__pyx_n_statchkdir, "statchkdir"},
  {&__pyx_n_statfree, "statfree"},
  {&__pyx_n_statinidir, "statinidir"},
  {&__pyx_n_strerror, "strerror"},
  {0, 0}
};

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_k12p, __pyx_k12, sizeof(__pyx_k12)},
  {0, 0, 0}
};

static PyObject *__pyx_tp_new_9libclamav_clamav(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  struct __pyx_obj_9libclamav_clamav *p = (struct __pyx_obj_9libclamav_clamav *)o;
  p->status = Py_None; Py_INCREF(Py_None);
  p->dirname = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9libclamav_clamav(PyObject *o) {
  struct __pyx_obj_9libclamav_clamav *p = (struct __pyx_obj_9libclamav_clamav *)o;
  Py_XDECREF(p->status);
  Py_XDECREF(p->dirname);
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_9libclamav_clamav(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9libclamav_clamav *p = (struct __pyx_obj_9libclamav_clamav *)o;
  if (p->status) {
    e = (*v)(p->status, a); if (e) return e;
  }
  if (p->dirname) {
    e = (*v)(p->dirname, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9libclamav_clamav(PyObject *o) {
  struct __pyx_obj_9libclamav_clamav *p = (struct __pyx_obj_9libclamav_clamav *)o;
  Py_XDECREF(p->status);
  p->status = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(p->dirname);
  p->dirname = Py_None; Py_INCREF(Py_None);
  return 0;
}

static struct PyMethodDef __pyx_methods_9libclamav_clamav[] = {
  {"__del__", (PyCFunction)__pyx_f_9libclamav_6clamav___del__, METH_VARARGS|METH_KEYWORDS, 0},
  {"retver", (PyCFunction)__pyx_f_9libclamav_6clamav_retver, METH_VARARGS|METH_KEYWORDS, 0},
  {"freetrie", (PyCFunction)__pyx_f_9libclamav_6clamav_freetrie, METH_VARARGS|METH_KEYWORDS, 0},
  {"loaddb", (PyCFunction)__pyx_f_9libclamav_6clamav_loaddb, METH_VARARGS|METH_KEYWORDS, 0},
  {"loaddbdir", (PyCFunction)__pyx_f_9libclamav_6clamav_loaddbdir, METH_VARARGS|METH_KEYWORDS, 0},
  {"checkstatus", (PyCFunction)__pyx_f_9libclamav_6clamav_checkstatus, METH_VARARGS|METH_KEYWORDS, 0},
  {"scanbuff", (PyCFunction)__pyx_f_9libclamav_6clamav_scanbuff, METH_VARARGS|METH_KEYWORDS, 0},
  {"scandesc", (PyCFunction)__pyx_f_9libclamav_6clamav_scandesc, METH_VARARGS|METH_KEYWORDS, 0},
  {"scanfile", (PyCFunction)__pyx_f_9libclamav_6clamav_scanfile, METH_VARARGS|METH_KEYWORDS, 0},
  {"statinidir", (PyCFunction)__pyx_f_9libclamav_6clamav_statinidir, METH_VARARGS|METH_KEYWORDS, 0},
  {"statchkdir", (PyCFunction)__pyx_f_9libclamav_6clamav_statchkdir, METH_VARARGS|METH_KEYWORDS, 0},
  {"statfree", (PyCFunction)__pyx_f_9libclamav_6clamav_statfree, METH_VARARGS|METH_KEYWORDS, 0},
  {"strerror", (PyCFunction)__pyx_f_9libclamav_6clamav_strerror, METH_VARARGS|METH_KEYWORDS, 0},
  {"reload", (PyCFunction)__pyx_f_9libclamav_6clamav_reload, METH_VARARGS|METH_KEYWORDS, 0},
  {"setlimits", (PyCFunction)__pyx_f_9libclamav_6clamav_setlimits, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyMemberDef __pyx_members_9libclamav_clamav[] = {
  {"virnum", T_INT, offsetof(struct __pyx_obj_9libclamav_clamav, virnum), READONLY, 0},
  {"status", T_OBJECT, offsetof(struct __pyx_obj_9libclamav_clamav, status), READONLY, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_clamav = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_clamav = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_clamav = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_clamav = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_9libclamav_clamav = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "libclamav.clamav", /*tp_name*/
  sizeof(struct __pyx_obj_9libclamav_clamav), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9libclamav_clamav, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_clamav, /*tp_as_number*/
  &__pyx_tp_as_sequence_clamav, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_clamav, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_clamav, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9libclamav_clamav, /*tp_traverse*/
  __pyx_tp_clear_9libclamav_clamav, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9libclamav_clamav, /*tp_methods*/
  __pyx_members_9libclamav_clamav, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_f_9libclamav_6clamav___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9libclamav_clamav, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static struct PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

PyMODINIT_FUNC initlibclamav(void); /*proto*/
PyMODINIT_FUNC initlibclamav(void) {
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  __pyx_init_filenames();
  __pyx_m = Py_InitModule4("libclamav", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  __pyx_b = PyImport_AddModule("__builtin__");
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  __pyx_type_9libclamav_clamav.tp_free = _PyObject_GC_Del;
  if (PyType_Ready(&__pyx_type_9libclamav_clamav) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "clamav", (PyObject *)&__pyx_type_9libclamav_clamav) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;}
  __pyx_ptype_9libclamav_clamav = &__pyx_type_9libclamav_clamav;

  /* "/tmp/sagator/libclamav/libclamav.pyx":13 */
  __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_CLEAN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":14 */
  __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_VIRUS, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":17 */
  __pyx_1 = PyInt_FromLong(10); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EMAXREC, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":18 */
  __pyx_1 = PyInt_FromLong(11); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EMAXSIZE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":19 */
  __pyx_1 = PyInt_FromLong(12); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EMAXFILES, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":20 */
  __pyx_1 = PyInt_FromLong(100); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_ERAR, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":21 */
  __pyx_1 = PyInt_FromLong(101); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EZIP, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":22 */
  __pyx_1 = PyInt_FromLong(102); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EMALFZIP, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":23 */
  __pyx_1 = PyInt_FromLong(103); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EGZIP, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":24 */
  __pyx_1 = PyInt_FromLong(104); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EBZIP, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":25 */
  __pyx_1 = PyInt_FromLong(105); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EOLE2, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":26 */
  __pyx_1 = PyInt_FromLong(106); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EMSCOMP, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":27 */
  __pyx_1 = PyInt_FromLong(107); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EMSCAB, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":28 */
  __pyx_1 = PyInt_FromLong(200); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EACCES, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":29 */
  __pyx_1 = PyInt_FromLong(300); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_ENULLARG, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":30 */
  __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_ETMPFILE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":31 */
  __pyx_1 = PyInt_FromLong((-2)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EFSYNC, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":32 */
  __pyx_1 = PyInt_FromLong((-3)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EMEM, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":33 */
  __pyx_1 = PyInt_FromLong((-4)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EOPEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":34 */
  __pyx_1 = PyInt_FromLong((-5)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EMALFDB, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":35 */
  __pyx_1 = PyInt_FromLong((-6)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EPATSHORT, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":36 */
  __pyx_1 = PyInt_FromLong((-7)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_ETMPDIR, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":37 */
  __pyx_1 = PyInt_FromLong((-8)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_ECVD, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":38 */
  __pyx_1 = PyInt_FromLong((-9)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_ECVDEXTR, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":39 */
  __pyx_1 = PyInt_FromLong((-10)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EMD5, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":40 */
  __pyx_1 = PyInt_FromLong((-11)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EDSIG, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":41 */
  __pyx_1 = PyInt_FromLong((-12)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EIO, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":42 */
  __pyx_1 = PyInt_FromLong((-13)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_EFORMAT, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":45 */
  __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_RAW, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":46 */
  __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_ARCHIVE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":47 */
  __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_MAIL, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":48 */
  __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_DISABLERAR, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":49 */
  __pyx_1 = PyInt_FromLong(8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_OLE2, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":50 */
  __pyx_1 = PyInt_FromLong(16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_BLOCKENCRYPTED, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":51 */
  __pyx_1 = PyInt_FromLong(32); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_HTML, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":52 */
  __pyx_1 = PyInt_FromLong(64); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_PE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":53 */
  __pyx_1 = PyInt_FromLong(128); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_BLOCKBROKEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":54 */
  __pyx_1 = PyInt_FromLong(256); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_MAILURL, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":55 */
  __pyx_1 = PyInt_FromLong(512); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_BLOCKMAX, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":59 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_ARCHIVE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_MAIL); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
  __pyx_3 = PyNumber_Or(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_OLE2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  __pyx_2 = PyNumber_Or(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_HTML); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  __pyx_1 = PyNumber_Or(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_PE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  __pyx_3 = PyNumber_Or(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_DISABLERAR); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;}
  __pyx_2 = PyNumber_Or(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_SCAN_DEFAULT, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":62 */
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_RAW); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_RAW, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":63 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_ARCHIVE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_ARCHIVE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":64 */
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_MAIL); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_MAIL, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":65 */
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_DISABLERAR); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_DISABLERAR, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":66 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_OLE2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_OLE2, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":67 */
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_BLOCKENCRYPTED); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_ENCRYPTED, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":68 */
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_DEFAULT); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_CL_DEFAULT, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":106 */
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
  __pyx_2 = 0;
  if (PyDict_SetItemString(__pyx_1, "__doc__", __pyx_n_ClamAVError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
  __pyx_2 = __Pyx_CreateClass(__pyx_3, __pyx_1, __pyx_n_ClamAVError, "libclamav"); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":108 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ClamAVError, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":119 */
  Py_INCREF(Py_None);
  __pyx_k3 = Py_None;

  /* "/tmp/sagator/libclamav/libclamav.pyx":146 */
  Py_INCREF(Py_None);
  __pyx_k4 = Py_None;

  /* "/tmp/sagator/libclamav/libclamav.pyx":156 */
  Py_INCREF(Py_None);
  __pyx_k5 = Py_None;

  /* "/tmp/sagator/libclamav/libclamav.pyx":166 */
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_DEFAULT); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;}
  __pyx_k6 = __pyx_3;
  __pyx_3 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":171 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_CL_SCAN_DEFAULT); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;}
  __pyx_k7 = __pyx_1;
  __pyx_1 = 0;

  /* "/tmp/sagator/libclamav/libclamav.pyx":176 */
  Py_INCREF(Py_None);
  __pyx_k8 = Py_None;

  /* "/tmp/sagator/libclamav/libclamav.pyx":190 */
  Py_INCREF(Py_None);
  __pyx_k9 = Py_None;

  /* "/tmp/sagator/libclamav/libclamav.pyx":195 */
  Py_INCREF(Py_None);
  __pyx_k10 = Py_None;

  /* "/tmp/sagator/libclamav/libclamav.pyx":206 */
  __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; goto __pyx_L1;}
  __pyx_k11 = __pyx_2;
  __pyx_2 = 0;
  return;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("libclamav");
}

static char *__pyx_filenames[] = {
  "libclamav.pyx",
};

/* Runtime support code */

static void __pyx_init_filenames(void) {
  __pyx_f = __pyx_filenames;
}

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}

static PyObject *__Pyx_CreateClass(
    PyObject *bases, PyObject *dict, PyObject *name, char *modname)
{
    PyObject *py_modname;
    PyObject *result = 0;
    
    py_modname = PyString_FromString(modname);
    if (!py_modname)
        goto bad;
    if (PyDict_SetItemString(dict, "__module__", py_modname) < 0)
        goto bad;
    result = PyClass_New(bases, dict, name);
bad:
    Py_XDECREF(py_modname);
    return result;
}

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    /* Next, repeatedly, replace a tuple exception with its first item */
    while (PyTuple_Check(type) && PyTuple_Size(type) > 0) {
        PyObject *tmp = type;
        type = PyTuple_GET_ITEM(type, 0);
        Py_INCREF(type);
        Py_DECREF(tmp);
    }
    if (PyString_Check(type))
        ;
    else if (PyClass_Check(type))
        ; /*PyErr_NormalizeException(&type, &value, &tb);*/
    else if (PyInstance_Check(type)) {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
              "instance exception may not have a separate value");
            goto raise_error;
        }
        else {
            /* Normalize to raise <class>, <instance> */
            Py_DECREF(value);
            value = type;
            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
            Py_INCREF(type);
        }
    }
    else {
        /* Not something you can raise.  You get an exception
           anyway, just not what you specified :-) */
        PyErr_Format(PyExc_TypeError,
                 "exceptions must be strings, classes, or "
                 "instances, not %s", type->ob_type->tp_name);
        goto raise_error;
    }
    PyErr_Restore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}

static void __Pyx_UnpackError(void) {
    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
}

static PyObject *__Pyx_UnpackItem(PyObject *seq, int i) {
  PyObject *item;
  if (!(item = PySequence_GetItem(seq, i))) {
    if (PyErr_ExceptionMatches(PyExc_IndexError))
    	__Pyx_UnpackError();
  }
  return item;
}

static int __Pyx_EndUnpack(PyObject *seq, int i) {
  PyObject *item;
  if (item = PySequence_GetItem(seq, i)) {
    Py_DECREF(item);
    __Pyx_UnpackError();
    return -1;
  }
  PyErr_Clear();
    return 0;
}

static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
    while (t->p) {
        *t->p = PyString_InternFromString(t->s);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyObject *empty_tuple = 0;
    PyObject *empty_string = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    
    py_srcfile = PyString_FromString(__pyx_filename);
    if (!py_srcfile) goto bad;
    py_funcname = PyString_FromString(funcname);
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    empty_tuple = PyTuple_New(0);
    if (!empty_tuple) goto bad;
    empty_string = PyString_FromString("");
    if (!empty_string) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        empty_string, /*PyObject *code,*/
        empty_tuple,  /*PyObject *consts,*/
        empty_tuple,  /*PyObject *names,*/
        empty_tuple,  /*PyObject *varnames,*/
        empty_tuple,  /*PyObject *freevars,*/
        empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        empty_string  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_Get(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(empty_tuple);
    Py_XDECREF(empty_string);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
