/usr/include/python2.7/mx/mxBeeBase.h is in python-egenix-mx-base-dev 3.2.9-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | #ifndef MXBEEBASE_H
#define MXBEEBASE_H
#ifdef __cplusplus
extern "C" {
#endif
/*
mxBeeBase -- B++-Tree implementation build on top of the free source
code published in:
SORTING AND SEARCHING ALGORITHMS: A COOKBOOK
by THOMAS NIEMANN Portland, Oregon
email: thomasn@jps.net
home: http://members.xoom.com/thomasn/s_man.htm
From the cookbook:
Permission to reproduce this document, in whole or in part, is
given provided the original web site listed below is referenced,
and no additional restrictions apply. Source code, when part of a
software project, may be used freely without reference to the
author.
The Python interface and the modifications to the above mentioned
source code base are:
Copyright (c) 2000, Marc-Andre Lemburg; mailto:mal@lemburg.com
Copyright (c) 2000-2015, eGenix.com Software GmbH; mailto:info@egenix.com
*/
/* The extension's name; must be the same as the init function's suffix */
#define MXBEEBASE_MODULE "mxBeeBase"
/* B++-Tree Header file */
#include "btr.h"
/* --- No servicable parts below this line ----------------------*/
/* Include generic mx extension header file */
#include "mxh.h"
#ifdef MX_BUILDING_MXBEEBASE
# define MXBEEBASE_EXTERNALIZE MX_EXPORT
#else
# define MXBEEBASE_EXTERNALIZE MX_IMPORT
#endif
/* --- BeeBase Object ------------------------------------------*/
typedef struct mxBeeIndexObject {
PyObject_HEAD
/* BTree data */
bDescription info; /* Information structure */
bHandle *handle; /* Handle for the BTree Index */
long updates; /* Update count used to identify invalid
cursors */
int length; /* Cache for current length; don't use
directly */
long length_state; /* Update count of last length
calculation */
/* Data conversion routines for key management */
PyObject *(*ObjectFromKey)(struct mxBeeIndexObject *beeindex, void *key);
void *(*KeyFromObject)(struct mxBeeIndexObject *beeindex, PyObject *obj);
} mxBeeIndexObject;
typedef PyObject *(*mxObjectFromKeyFunc)(struct mxBeeIndexObject *beeindex, void *key);
typedef void *(*mxKeyFromObjectFunc)(struct mxBeeIndexObject *beeindex, PyObject *obj);
/* --- BeeBase Cursor Object -----------------------------------*/
typedef struct {
PyObject_HEAD
mxBeeIndexObject *beeindex; /* BeeIndex object */
bCursor c; /* Cursor */
bIdxAddr adr; /* Cursor's buffer address - needed to
check whether the buffer pointed to
by cursor is still containing the
data we expect */
long updates; /* Copy of beeindex's updates value - needed
to check whether the beeindex changed after
the cursor was created. If it is, then
the cursor is invalid. */
} mxBeeCursorObject;
/* EOF */
#ifdef __cplusplus
}
#endif
#endif
|