Use named field structure initialization in order to clarify code and reduce
clutter.
This commit is contained in:
parent
53a9f41ed1
commit
08346005a7
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -58,4 +58,3 @@ int cxoBuffer_init(cxoBuffer *buf)
|
||||
buf->obj = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -189,51 +189,20 @@ static PyGetSetDef cxoConnectionCalcMembers[] = {
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// declaration of Python type "Connection"
|
||||
// declaration of Python type
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeConnection = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.Connection", // tp_name
|
||||
sizeof(cxoConnection), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoConnection_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoConnection_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
|
||||
// tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoConnectionMethods, // tp_methods
|
||||
cxoConnectionMembers, // tp_members
|
||||
cxoConnectionCalcMembers, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
(initproc) cxoConnection_init, // tp_init
|
||||
0, // tp_alloc
|
||||
(newfunc) cxoConnection_new, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.Connection",
|
||||
.tp_basicsize = sizeof(cxoConnection),
|
||||
.tp_dealloc = (destructor) cxoConnection_free,
|
||||
.tp_repr = (reprfunc) cxoConnection_repr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
|
||||
.tp_methods = cxoConnectionMethods,
|
||||
.tp_members = cxoConnectionMembers,
|
||||
.tp_getset = cxoConnectionCalcMembers,
|
||||
.tp_init = (initproc) cxoConnection_init,
|
||||
.tp_new = (newfunc) cxoConnection_new
|
||||
};
|
||||
|
||||
|
||||
@ -2043,4 +2012,3 @@ static int cxoConnection_setModule(cxoConnection* conn, PyObject *value,
|
||||
{
|
||||
return cxoConnection_setAttrText(conn, value, dpiConn_setModule);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -128,47 +128,18 @@ static PyGetSetDef cxoCursorCalcMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeCursor = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.Cursor", // tp_name
|
||||
sizeof(cxoCursor), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoCursor_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoCursor_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
|
||||
// tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
(getiterfunc) cxoCursor_getIter, // tp_iter
|
||||
(iternextfunc) cxoCursor_getNext, // tp_iternext
|
||||
cxoCursorMethods, // tp_methods
|
||||
cxoCursorMembers, // tp_members
|
||||
cxoCursorCalcMembers, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
(initproc) cxoCursor_init, // tp_init
|
||||
0, // tp_alloc
|
||||
cxoCursor_new, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.Cursor",
|
||||
.tp_basicsize = sizeof(cxoCursor),
|
||||
.tp_dealloc = (destructor) cxoCursor_free,
|
||||
.tp_repr = (reprfunc) cxoCursor_repr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
|
||||
.tp_iter = (getiterfunc) cxoCursor_getIter,
|
||||
.tp_iternext = (iternextfunc) cxoCursor_getNext,
|
||||
.tp_methods = cxoCursorMethods,
|
||||
.tp_members = cxoCursorMembers,
|
||||
.tp_getset = cxoCursorCalcMembers,
|
||||
.tp_init = (initproc) cxoCursor_init,
|
||||
.tp_new = cxoCursor_new
|
||||
};
|
||||
|
||||
|
||||
@ -2217,4 +2188,3 @@ static PyObject *cxoCursor_contextManagerExit(cxoCursor *cursor,
|
||||
Py_INCREF(Py_False);
|
||||
return Py_False;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -71,46 +71,11 @@ static PyGetSetDef cxoDeqOptionsCalcMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeDeqOptions = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.DeqOptions", // tp_name
|
||||
sizeof(cxoDeqOptions), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoDeqOptions_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
0, // tp_methods
|
||||
0, // tp_members
|
||||
cxoDeqOptionsCalcMembers, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.DeqOptions",
|
||||
.tp_basicsize = sizeof(cxoDeqOptions),
|
||||
.tp_dealloc = (destructor) cxoDeqOptions_free,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_getset = cxoDeqOptionsCalcMembers
|
||||
};
|
||||
|
||||
|
||||
@ -471,4 +436,3 @@ static int cxoDeqOptions_setWait(cxoDeqOptions *options, PyObject *valueObj,
|
||||
return cxoError_raiseAndReturnInt();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -43,46 +43,11 @@ static PyGetSetDef cxoEnqOptionsCalcMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeEnqOptions = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.EnqOptions", // tp_name
|
||||
sizeof(cxoEnqOptions), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoEnqOptions_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
0, // tp_methods
|
||||
0, // tp_members
|
||||
cxoEnqOptionsCalcMembers, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.EnqOptions",
|
||||
.tp_basicsize = sizeof(cxoEnqOptions),
|
||||
.tp_dealloc = (destructor) cxoEnqOptions_free,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_getset = cxoEnqOptionsCalcMembers
|
||||
};
|
||||
|
||||
|
||||
@ -219,4 +184,3 @@ static int cxoEnqOptions_setVisibility(cxoEnqOptions *self,
|
||||
return cxoError_raiseAndReturnInt();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -51,46 +51,14 @@ static PyMemberDef cxoErrorMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeError = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle._Error", // tp_name
|
||||
sizeof(cxoError), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoError_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
(reprfunc) cxoError_str, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoErrorMethods, // tp_methods
|
||||
cxoErrorMembers, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
cxoError_new, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle._Error",
|
||||
.tp_basicsize = sizeof(cxoError),
|
||||
.tp_dealloc = (destructor) cxoError_free,
|
||||
.tp_str = (reprfunc) cxoError_str,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_methods = cxoErrorMethods,
|
||||
.tp_members = cxoErrorMembers,
|
||||
.tp_new = cxoError_new
|
||||
};
|
||||
|
||||
|
||||
@ -325,4 +293,3 @@ static PyObject *cxoError_str(cxoError *error)
|
||||
Py_INCREF(error->message);
|
||||
return error->message;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -23,25 +23,12 @@ static int cxoFuture_setAttr(cxoFuture*, PyObject*, PyObject*);
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeFuture = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.__future__", // tp_name
|
||||
sizeof(cxoFuture), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoFuture_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
(getattrofunc) cxoFuture_getAttr, // tp_getattro
|
||||
(setattrofunc) cxoFuture_setAttr, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT // tp_flags
|
||||
.tp_name = "cx_Oracle.__future__",
|
||||
.tp_basicsize = sizeof(cxoFuture),
|
||||
.tp_dealloc = (destructor) cxoFuture_free,
|
||||
.tp_getattro = (getattrofunc) cxoFuture_getAttr,
|
||||
.tp_setattro = (setattrofunc) cxoFuture_setAttr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT
|
||||
};
|
||||
|
||||
|
||||
@ -75,4 +62,3 @@ static int cxoFuture_setAttr(cxoFuture *obj, PyObject *nameObject,
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
49
src/cxoLob.c
49
src/cxoLob.c
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -58,46 +58,12 @@ static PyMethodDef cxoLobMethods[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeLob = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.LOB", // tp_name
|
||||
sizeof(cxoLob), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoLob_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
(reprfunc) cxoLob_str, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoLobMethods, // tp_methods
|
||||
0, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.LOB",
|
||||
.tp_basicsize = sizeof(cxoLob),
|
||||
.tp_dealloc = (destructor) cxoLob_free,
|
||||
.tp_str = (reprfunc) cxoLob_str,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_methods = cxoLobMethods
|
||||
};
|
||||
|
||||
|
||||
@ -481,4 +447,3 @@ static PyObject *cxoLob_fileExists(cxoLob *lob, PyObject *args)
|
||||
Py_RETURN_TRUE;
|
||||
Py_RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -74,46 +74,12 @@ static PyGetSetDef cxoCalcMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeMsgProps = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.MessageProperties", // tp_name
|
||||
sizeof(cxoMsgProps), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoMsgProps_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
0, // tp_methods
|
||||
cxoMembers, // tp_members
|
||||
cxoCalcMembers, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.MessageProperties",
|
||||
.tp_basicsize = sizeof(cxoMsgProps),
|
||||
.tp_dealloc = (destructor) cxoMsgProps_free,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_members = cxoMembers,
|
||||
.tp_getset = cxoCalcMembers
|
||||
};
|
||||
|
||||
|
||||
@ -416,4 +382,3 @@ static int cxoMsgProps_setPriority(cxoMsgProps *props, PyObject *valueObj,
|
||||
{
|
||||
return cxoMsgProps_setAttrInt32(props, valueObj, dpiMsgProps_setPriority);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -75,34 +75,15 @@ static PyMemberDef cxoObjectMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeObject = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.Object", // tp_name
|
||||
sizeof(cxoObject), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoObject_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoObject_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
(getattrofunc) cxoObject_getAttr, // tp_getattro
|
||||
(setattrofunc) cxoObject_setAttr, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoObjectMethods, // tp_methods
|
||||
cxoObjectMembers // tp_members
|
||||
.tp_name = "cx_Oracle.Object",
|
||||
.tp_basicsize = sizeof(cxoObject),
|
||||
.tp_dealloc = (destructor) cxoObject_free,
|
||||
.tp_repr = (reprfunc) cxoObject_repr,
|
||||
.tp_getattro = (getattrofunc) cxoObject_getAttr,
|
||||
.tp_setattro = (setattrofunc) cxoObject_setAttr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_methods = cxoObjectMethods,
|
||||
.tp_members = cxoObjectMembers
|
||||
};
|
||||
|
||||
|
||||
@ -702,4 +683,3 @@ static PyObject *cxoObject_trim(cxoObject *obj, PyObject *args)
|
||||
return cxoError_raiseAndReturnNull();
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -30,46 +30,12 @@ static PyMemberDef cxoObjectAttrMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeObjectAttr = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.ObjectAttribute", // tp_name
|
||||
sizeof(cxoObjectAttr), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoObjectAttr_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoObjectAttr_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
0, // tp_methods
|
||||
cxoObjectAttrMembers, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.ObjectAttribute",
|
||||
.tp_basicsize = sizeof(cxoObjectAttr),
|
||||
.tp_dealloc = (destructor) cxoObjectAttr_free,
|
||||
.tp_repr = (reprfunc) cxoObjectAttr_repr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_members = cxoObjectAttrMembers
|
||||
};
|
||||
|
||||
|
||||
@ -158,4 +124,3 @@ static PyObject *cxoObjectAttr_repr(cxoObjectAttr *attr)
|
||||
Py_DECREF(name);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -52,46 +52,14 @@ static PyMemberDef cxoObjectTypeMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeObjectType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.ObjectType", // tp_name
|
||||
sizeof(cxoObjectType), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoObjectType_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoObjectType_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
(ternaryfunc) cxoObjectType_newObject, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoObjectTypeMethods, // tp_methods
|
||||
cxoObjectTypeMembers, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.ObjectType",
|
||||
.tp_basicsize = sizeof(cxoObjectType),
|
||||
.tp_dealloc = (destructor) cxoObjectType_free,
|
||||
.tp_repr = (reprfunc) cxoObjectType_repr,
|
||||
.tp_call = (ternaryfunc) cxoObjectType_newObject,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_methods = cxoObjectTypeMethods,
|
||||
.tp_members = cxoObjectTypeMembers,
|
||||
};
|
||||
|
||||
|
||||
@ -299,4 +267,3 @@ static PyObject *cxoObjectType_newObject(cxoObjectType *objType,
|
||||
|
||||
return (PyObject*) obj;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -51,46 +51,13 @@ static PyMemberDef cxoMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeQueue = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.Queue", // tp_name
|
||||
sizeof(cxoQueue), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoQueue_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoQueue_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoMethods, // tp_methods
|
||||
cxoMembers, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.Queue",
|
||||
.tp_basicsize = sizeof(cxoQueue),
|
||||
.tp_dealloc = (destructor) cxoQueue_free,
|
||||
.tp_repr = (reprfunc) cxoQueue_repr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_methods = cxoMethods,
|
||||
.tp_members = cxoMembers
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -96,47 +96,15 @@ static PyGetSetDef cxoSessionPoolCalcMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeSessionPool = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.SessionPool", // tp_name
|
||||
sizeof(cxoSessionPool), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoSessionPool_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
|
||||
// tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoSessionPoolMethods, // tp_methods
|
||||
cxoSessionPoolMembers, // tp_members
|
||||
cxoSessionPoolCalcMembers, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
(initproc) cxoSessionPool_init, // tp_init
|
||||
0, // tp_alloc
|
||||
(newfunc) cxoSessionPool_new, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.SessionPool",
|
||||
.tp_basicsize = sizeof(cxoSessionPool),
|
||||
.tp_dealloc = (destructor) cxoSessionPool_free,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
|
||||
.tp_methods = cxoSessionPoolMethods,
|
||||
.tp_members = cxoSessionPoolMembers,
|
||||
.tp_getset = cxoSessionPoolCalcMembers,
|
||||
.tp_init = (initproc) cxoSessionPool_init,
|
||||
.tp_new = (newfunc) cxoSessionPool_new
|
||||
};
|
||||
|
||||
|
||||
@ -653,4 +621,3 @@ static int cxoSessionPool_setWaitTimeout(cxoSessionPool *pool, PyObject *value,
|
||||
{
|
||||
return cxoSessionPool_setAttribute(pool, value, dpiPool_setWaitTimeout);
|
||||
}
|
||||
|
||||
|
||||
@ -76,46 +76,14 @@ static PyGetSetDef cxoCalcMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeSodaCollection = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.SodaCollection", // tp_name
|
||||
sizeof(cxoSodaCollection), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoSodaCollection_free,// tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoSodaCollection_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoMethods, // tp_methods
|
||||
cxoMembers, // tp_members
|
||||
cxoCalcMembers, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.SodaCollection",
|
||||
.tp_basicsize = sizeof(cxoSodaCollection),
|
||||
.tp_dealloc = (destructor) cxoSodaCollection_free,
|
||||
.tp_repr = (reprfunc) cxoSodaCollection_repr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_methods = cxoMethods,
|
||||
.tp_members = cxoMembers,
|
||||
.tp_getset = cxoCalcMembers
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -43,46 +43,12 @@ static PyMethodDef cxoMethods[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeSodaDatabase = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.SodaDatabase", // tp_name
|
||||
sizeof(cxoSodaDatabase), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoSodaDatabase_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoSodaDatabase_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoMethods, // tp_methods
|
||||
0, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.SodaDatabase",
|
||||
.tp_basicsize = sizeof(cxoSodaDatabase),
|
||||
.tp_dealloc = (destructor) cxoSodaDatabase_free,
|
||||
.tp_repr = (reprfunc) cxoSodaDatabase_repr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_methods = cxoMethods
|
||||
};
|
||||
|
||||
|
||||
@ -378,4 +344,3 @@ static PyObject *cxoSodaDatabase_openCollection(cxoSodaDatabase *db,
|
||||
|
||||
return (PyObject*) coll;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -55,46 +55,13 @@ static PyGetSetDef cxoCalcMembers[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeSodaDoc = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.SodaDoc", // tp_name
|
||||
sizeof(cxoSodaDoc), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoSodaDoc_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoSodaDoc_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoMethods, // tp_methods
|
||||
0, // tp_members
|
||||
cxoCalcMembers, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.SodaDoc",
|
||||
.tp_basicsize = sizeof(cxoSodaDoc),
|
||||
.tp_dealloc = (destructor) cxoSodaDoc_free,
|
||||
.tp_repr = (reprfunc) cxoSodaDoc_repr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_methods = cxoMethods,
|
||||
.tp_getset = cxoCalcMembers
|
||||
};
|
||||
|
||||
|
||||
@ -306,4 +273,3 @@ static PyObject *cxoSodaDoc_getContentAsString(cxoSodaDoc *doc, PyObject *args)
|
||||
return PyUnicode_Decode(content, contentLength, encoding, NULL);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -35,46 +35,14 @@ static PyMethodDef cxoMethods[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeSodaDocCursor = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.SodaDocCursor", // tp_name
|
||||
sizeof(cxoSodaDocCursor), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoSodaDocCursor_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoSodaDocCursor_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
(getiterfunc) cxoSodaDocCursor_getIter, // tp_iter
|
||||
(iternextfunc) cxoSodaDocCursor_getNext, // tp_iternext
|
||||
cxoMethods, // tp_methods
|
||||
0, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.SodaDocCursor",
|
||||
.tp_basicsize = sizeof(cxoSodaDocCursor),
|
||||
.tp_dealloc = (destructor) cxoSodaDocCursor_free,
|
||||
.tp_repr = (reprfunc) cxoSodaDocCursor_repr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_iter = (getiterfunc) cxoSodaDocCursor_getIter,
|
||||
.tp_iternext = (iternextfunc) cxoSodaDocCursor_getNext,
|
||||
.tp_methods = cxoMethods
|
||||
};
|
||||
|
||||
|
||||
@ -181,4 +149,3 @@ static PyObject *cxoSodaDocCursor_getNext(cxoSodaDocCursor *cursor)
|
||||
return NULL;
|
||||
return (PyObject*) doc;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -59,46 +59,12 @@ static PyMethodDef cxoMethods[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeSodaOperation = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.SodaOperation", // tp_name
|
||||
sizeof(cxoSodaOperation), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoSodaOperation_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoSodaOperation_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoMethods, // tp_methods
|
||||
0, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.SodaOperation",
|
||||
.tp_basicsize = sizeof(cxoSodaOperation),
|
||||
.tp_dealloc = (destructor) cxoSodaOperation_free,
|
||||
.tp_repr = (reprfunc) cxoSodaOperation_repr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_methods = cxoMethods
|
||||
};
|
||||
|
||||
|
||||
@ -558,4 +524,3 @@ static PyObject *cxoSodaOperation_replaceOneAndGet(cxoSodaOperation *op,
|
||||
return (PyObject*) cxoSodaDoc_new(op->coll->db, replacedHandle);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
230
src/cxoSubscr.c
230
src/cxoSubscr.c
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -94,224 +94,51 @@ static PyMethodDef cxoSubscrTypeMethods[] = {
|
||||
//-----------------------------------------------------------------------------
|
||||
PyTypeObject cxoPyTypeSubscr = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.Subscription", // tp_name
|
||||
sizeof(cxoSubscr), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoSubscr_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
(reprfunc) cxoSubscr_repr, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
cxoSubscrTypeMethods, // tp_methods
|
||||
cxoSubscrTypeMembers, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.Subscription",
|
||||
.tp_basicsize = sizeof(cxoSubscr),
|
||||
.tp_dealloc = (destructor) cxoSubscr_free,
|
||||
.tp_repr = (reprfunc) cxoSubscr_repr,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_methods = cxoSubscrTypeMethods,
|
||||
.tp_members = cxoSubscrTypeMembers
|
||||
};
|
||||
|
||||
PyTypeObject cxoPyTypeMessage = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.Message", // tp_name
|
||||
sizeof(cxoMessage), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoMessage_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
0, // tp_methods
|
||||
cxoMessageTypeMembers, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.Message",
|
||||
.tp_basicsize = sizeof(cxoMessage),
|
||||
.tp_dealloc = (destructor) cxoMessage_free,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_members = cxoMessageTypeMembers
|
||||
};
|
||||
|
||||
PyTypeObject cxoPyTypeMessageTable = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.MessageTable", // tp_name
|
||||
sizeof(cxoMessageTable), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoMessageTable_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
0, // tp_methods
|
||||
cxoMessageTableTypeMembers, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.MessageTable",
|
||||
.tp_basicsize = sizeof(cxoMessageTable),
|
||||
.tp_dealloc = (destructor) cxoMessageTable_free,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_members = cxoMessageTableTypeMembers
|
||||
};
|
||||
|
||||
|
||||
PyTypeObject cxoPyTypeMessageRow = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.MessageRow", // tp_name
|
||||
sizeof(cxoMessageRow), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoMessageRow_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
0, // tp_methods
|
||||
cxoMessageRowTypeMembers, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.MessageRow",
|
||||
.tp_basicsize = sizeof(cxoMessageRow),
|
||||
.tp_dealloc = (destructor) cxoMessageRow_free,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_members = cxoMessageRowTypeMembers
|
||||
};
|
||||
|
||||
|
||||
PyTypeObject cxoPyTypeMessageQuery = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"cx_Oracle.MessageQuery", // tp_name
|
||||
sizeof(cxoMessageQuery), // tp_basicsize
|
||||
0, // tp_itemsize
|
||||
(destructor) cxoMessageQuery_free, // tp_dealloc
|
||||
0, // tp_print
|
||||
0, // tp_getattr
|
||||
0, // tp_setattr
|
||||
0, // tp_compare
|
||||
0, // tp_repr
|
||||
0, // tp_as_number
|
||||
0, // tp_as_sequence
|
||||
0, // tp_as_mapping
|
||||
0, // tp_hash
|
||||
0, // tp_call
|
||||
0, // tp_str
|
||||
0, // tp_getattro
|
||||
0, // tp_setattro
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, // tp_doc
|
||||
0, // tp_traverse
|
||||
0, // tp_clear
|
||||
0, // tp_richcompare
|
||||
0, // tp_weaklistoffset
|
||||
0, // tp_iter
|
||||
0, // tp_iternext
|
||||
0, // tp_methods
|
||||
cxoMessageQueryTypeMembers, // tp_members
|
||||
0, // tp_getset
|
||||
0, // tp_base
|
||||
0, // tp_dict
|
||||
0, // tp_descr_get
|
||||
0, // tp_descr_set
|
||||
0, // tp_dictoffset
|
||||
0, // tp_init
|
||||
0, // tp_alloc
|
||||
0, // tp_new
|
||||
0, // tp_free
|
||||
0, // tp_is_gc
|
||||
0 // tp_bases
|
||||
.tp_name = "cx_Oracle.MessageQuery",
|
||||
.tp_basicsize = sizeof(cxoMessageQuery),
|
||||
.tp_dealloc = (destructor) cxoMessageQuery_free,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_members = cxoMessageQueryTypeMembers
|
||||
};
|
||||
|
||||
|
||||
@ -705,4 +532,3 @@ static void cxoMessageTable_free(cxoMessageTable *table)
|
||||
Py_CLEAR(table->rows);
|
||||
Py_TYPE(table)->tp_free((PyObject*) table);
|
||||
}
|
||||
|
||||
|
||||
@ -724,4 +724,3 @@ PyObject *cxoTransform_toPython(cxoTransformNum transformNum,
|
||||
return cxoError_raiseFromString(cxoNotSupportedErrorException,
|
||||
"Database value cannot be converted to a Python value");
|
||||
}
|
||||
|
||||
|
||||
@ -190,4 +190,3 @@ int cxoUtils_processSodaDocArg(cxoSodaDatabase *db, PyObject *arg,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
40
src/cxoVar.c
40
src/cxoVar.c
@ -1,5 +1,5 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
|
||||
//
|
||||
@ -69,35 +69,14 @@ static PyMethodDef cxoVarMethods[] = {
|
||||
#define DECLARE_VARIABLE_TYPE(INTERNAL_NAME, EXTERNAL_NAME) \
|
||||
PyTypeObject INTERNAL_NAME = { \
|
||||
PyVarObject_HEAD_INIT(NULL, 0) \
|
||||
"cx_Oracle." #EXTERNAL_NAME, /* tp_name */ \
|
||||
sizeof(cxoVar), /* tp_basicsize */ \
|
||||
0, /* tp_itemsize */ \
|
||||
(destructor) cxoVar_free, /* tp_dealloc */ \
|
||||
0, /* tp_print */ \
|
||||
0, /* tp_getattr */ \
|
||||
0, /* tp_setattr */ \
|
||||
0, /* tp_compare */ \
|
||||
(reprfunc) cxoVar_repr, /* tp_repr */ \
|
||||
0, /* tp_as_number */ \
|
||||
0, /* tp_as_sequence */ \
|
||||
0, /* tp_as_mapping */ \
|
||||
0, /* tp_hash */ \
|
||||
0, /* tp_call */ \
|
||||
0, /* tp_str */ \
|
||||
0, /* tp_getattro */ \
|
||||
0, /* tp_setattro */ \
|
||||
0, /* tp_as_buffer */ \
|
||||
Py_TPFLAGS_DEFAULT, /* tp_flags */ \
|
||||
0, /* tp_doc */ \
|
||||
0, /* tp_traverse */ \
|
||||
0, /* tp_clear */ \
|
||||
0, /* tp_richcompare */ \
|
||||
0, /* tp_weaklistoffset */ \
|
||||
0, /* tp_iter */ \
|
||||
0, /* tp_iternext */ \
|
||||
cxoVarMethods, /* tp_methods */ \
|
||||
cxoVarMembers, /* tp_members */ \
|
||||
cxoVarCalcMembers /* tp_getset */ \
|
||||
.tp_name = "cx_Oracle." #EXTERNAL_NAME, \
|
||||
.tp_basicsize = sizeof(cxoVar), \
|
||||
.tp_dealloc = (destructor) cxoVar_free, \
|
||||
.tp_repr = (reprfunc) cxoVar_repr, \
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT, \
|
||||
.tp_methods = cxoVarMethods, \
|
||||
.tp_members = cxoVarMembers, \
|
||||
.tp_getset = cxoVarCalcMembers \
|
||||
};
|
||||
|
||||
DECLARE_VARIABLE_TYPE(cxoPyTypeBfileVar, BFILE)
|
||||
@ -812,4 +791,3 @@ static PyObject *cxoVar_repr(cxoVar *var)
|
||||
Py_DECREF(value);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -294,4 +294,3 @@ cxoVarType *cxoVarType_fromPythonValue(PyObject *value, int *isArray,
|
||||
*size = cxoVarType_calculateSize(value, transformNum);
|
||||
return &cxoAllVarTypes[transformNum];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user