1 | n/a | /* prepare_protocol.c - the protocol for preparing values for SQLite |
---|
2 | n/a | * |
---|
3 | n/a | * Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de> |
---|
4 | n/a | * |
---|
5 | n/a | * This file is part of pysqlite. |
---|
6 | n/a | * |
---|
7 | n/a | * This software is provided 'as-is', without any express or implied |
---|
8 | n/a | * warranty. In no event will the authors be held liable for any damages |
---|
9 | n/a | * arising from the use of this software. |
---|
10 | n/a | * |
---|
11 | n/a | * Permission is granted to anyone to use this software for any purpose, |
---|
12 | n/a | * including commercial applications, and to alter it and redistribute it |
---|
13 | n/a | * freely, subject to the following restrictions: |
---|
14 | n/a | * |
---|
15 | n/a | * 1. The origin of this software must not be misrepresented; you must not |
---|
16 | n/a | * claim that you wrote the original software. If you use this software |
---|
17 | n/a | * in a product, an acknowledgment in the product documentation would be |
---|
18 | n/a | * appreciated but is not required. |
---|
19 | n/a | * 2. Altered source versions must be plainly marked as such, and must not be |
---|
20 | n/a | * misrepresented as being the original software. |
---|
21 | n/a | * 3. This notice may not be removed or altered from any source distribution. |
---|
22 | n/a | */ |
---|
23 | n/a | |
---|
24 | n/a | #include "prepare_protocol.h" |
---|
25 | n/a | |
---|
26 | n/a | int pysqlite_prepare_protocol_init(pysqlite_PrepareProtocol* self, PyObject* args, PyObject* kwargs) |
---|
27 | n/a | { |
---|
28 | n/a | return 0; |
---|
29 | n/a | } |
---|
30 | n/a | |
---|
31 | n/a | void pysqlite_prepare_protocol_dealloc(pysqlite_PrepareProtocol* self) |
---|
32 | n/a | { |
---|
33 | n/a | Py_TYPE(self)->tp_free((PyObject*)self); |
---|
34 | n/a | } |
---|
35 | n/a | |
---|
36 | n/a | PyTypeObject pysqlite_PrepareProtocolType= { |
---|
37 | n/a | PyVarObject_HEAD_INIT(NULL, 0) |
---|
38 | n/a | MODULE_NAME ".PrepareProtocol", /* tp_name */ |
---|
39 | n/a | sizeof(pysqlite_PrepareProtocol), /* tp_basicsize */ |
---|
40 | n/a | 0, /* tp_itemsize */ |
---|
41 | n/a | (destructor)pysqlite_prepare_protocol_dealloc, /* tp_dealloc */ |
---|
42 | n/a | 0, /* tp_print */ |
---|
43 | n/a | 0, /* tp_getattr */ |
---|
44 | n/a | 0, /* tp_setattr */ |
---|
45 | n/a | 0, /* tp_reserved */ |
---|
46 | n/a | 0, /* tp_repr */ |
---|
47 | n/a | 0, /* tp_as_number */ |
---|
48 | n/a | 0, /* tp_as_sequence */ |
---|
49 | n/a | 0, /* tp_as_mapping */ |
---|
50 | n/a | 0, /* tp_hash */ |
---|
51 | n/a | 0, /* tp_call */ |
---|
52 | n/a | 0, /* tp_str */ |
---|
53 | n/a | 0, /* tp_getattro */ |
---|
54 | n/a | 0, /* tp_setattro */ |
---|
55 | n/a | 0, /* tp_as_buffer */ |
---|
56 | n/a | Py_TPFLAGS_DEFAULT, /* tp_flags */ |
---|
57 | n/a | 0, /* tp_doc */ |
---|
58 | n/a | 0, /* tp_traverse */ |
---|
59 | n/a | 0, /* tp_clear */ |
---|
60 | n/a | 0, /* tp_richcompare */ |
---|
61 | n/a | 0, /* tp_weaklistoffset */ |
---|
62 | n/a | 0, /* tp_iter */ |
---|
63 | n/a | 0, /* tp_iternext */ |
---|
64 | n/a | 0, /* tp_methods */ |
---|
65 | n/a | 0, /* tp_members */ |
---|
66 | n/a | 0, /* tp_getset */ |
---|
67 | n/a | 0, /* tp_base */ |
---|
68 | n/a | 0, /* tp_dict */ |
---|
69 | n/a | 0, /* tp_descr_get */ |
---|
70 | n/a | 0, /* tp_descr_set */ |
---|
71 | n/a | 0, /* tp_dictoffset */ |
---|
72 | n/a | (initproc)pysqlite_prepare_protocol_init, /* tp_init */ |
---|
73 | n/a | 0, /* tp_alloc */ |
---|
74 | n/a | 0, /* tp_new */ |
---|
75 | n/a | 0 /* tp_free */ |
---|
76 | n/a | }; |
---|
77 | n/a | |
---|
78 | n/a | extern int pysqlite_prepare_protocol_setup_types(void) |
---|
79 | n/a | { |
---|
80 | n/a | pysqlite_PrepareProtocolType.tp_new = PyType_GenericNew; |
---|
81 | n/a | Py_TYPE(&pysqlite_PrepareProtocolType)= &PyType_Type; |
---|
82 | n/a | return PyType_Ready(&pysqlite_PrepareProtocolType); |
---|
83 | n/a | } |
---|