ekg2
plugins/python/python-config.h
Idź do dokumentacji tego pliku.
00001 /* $Id$ */
00002 
00003 /*
00004  *  (C) Copyright 2004-2005 Leszek Krupiński <leafnode@pld-linux.org>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License Version 2 as
00008  *  published by the Free Software Foundation.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 
00020 #ifndef __PYTHON_CONFIG_H_
00021 #define __PYTHON_CONFIG_H_
00022 
00023 #include <Python.h>
00024 
00025 typedef struct
00026 {
00027    PyObject_HEAD
00028 } ekg_configObj;
00029 
00030 void ekg_config_dealloc(PyObject *o);
00031 int ekg_config_len(ekg_configObj *self);
00032 PyObject* ekg_config_get(ekg_configObj * self, PyObject * key);
00033 PyObject* ekg_config_set(ekg_configObj * self, PyObject* key, PyObject* value);
00034 
00035 static PyMappingMethods _config_mapping = {
00036         (inquiry)       ekg_config_len,
00037         (binaryfunc)    ekg_config_get,
00038         (objobjargproc) ekg_config_set
00039 };
00040 
00041 static PyTypeObject ekg_config_type = {
00042         PyObject_HEAD_INIT(NULL)
00043         0,
00044         "config",
00045         sizeof(PyObject),
00046         0,
00047         ekg_config_dealloc,
00048         0,
00049         0,
00050         0,
00051         0,
00052         0,
00053         0,
00054         0,
00055         &_config_mapping
00056 };
00057 
00058 #endif
00059 
00060 /*
00061  * Local Variables:
00062  * mode: c
00063  * c-file-style: "k&r"
00064  * c-basic-offset: 8
00065  * indent-tabs-mode: t
00066  * End:
00067  * vim: sts=8 sw=8
00068  */
 All Struktury Danych Pliki Funkcje Zmienne Definicje typów Wyliczenia Wartości wyliczeń Definicje