11/* *
22 * @file pythonmonkey.cc
3- * @author Caleb Aikens ([email protected] ) 3+ * @author Caleb Aikens ([email protected] ) and Philippe Laporte ([email protected] ) 44 * @brief This file defines the pythonmonkey module, along with its various functions.
5- * @version 0.1
65 * @date 2023-03-29
76 *
8- * @copyright Copyright (c) 2023 Distributive Corp.
7+ * @copyright Copyright (c) 2023-2024 Distributive Corp.
98 *
109 */
1110
@@ -68,7 +67,7 @@ static PyTypeObject NullType = {
6867static PyTypeObject BigIntType = {
6968 .tp_name = " pythonmonkey.bigint" ,
7069 .tp_flags = Py_TPFLAGS_DEFAULT
71- | Py_TPFLAGS_LONG_SUBCLASS // https://docs.python.org/3/c-api/typeobj.html#Py_TPFLAGS_LONG_SUBCLASS
70+ | Py_TPFLAGS_LONG_SUBCLASS
7271 | Py_TPFLAGS_BASETYPE, // can be subclassed
7372 .tp_doc = PyDoc_STR (" Javascript BigInt object" ),
7473 .tp_base = &PyLong_Type, // extending the builtin int type
@@ -88,7 +87,7 @@ PyTypeObject JSObjectProxyType = {
8887 .tp_getattro = (getattrofunc)JSObjectProxyMethodDefinitions::JSObjectProxy_get,
8988 .tp_setattro = (setattrofunc)JSObjectProxyMethodDefinitions::JSObjectProxy_assign,
9089 .tp_flags = Py_TPFLAGS_DEFAULT
91- | Py_TPFLAGS_DICT_SUBCLASS, // https://docs.python.org/3/c-api/typeobj.html#Py_TPFLAGS_DICT_SUBCLASS
90+ | Py_TPFLAGS_DICT_SUBCLASS,
9291 .tp_doc = PyDoc_STR (" Javascript Object proxy dict" ),
9392 .tp_richcompare = (richcmpfunc)JSObjectProxyMethodDefinitions::JSObjectProxy_richcompare,
9493 .tp_iter = (getiterfunc)JSObjectProxyMethodDefinitions::JSObjectProxy_iter,
@@ -108,7 +107,7 @@ PyTypeObject JSArrayProxyType = {
108107 .tp_as_sequence = &JSArrayProxy_sequence_methods,
109108 .tp_as_mapping = &JSArrayProxy_mapping_methods,
110109 .tp_getattro = (getattrofunc)JSArrayProxyMethodDefinitions::JSArrayProxy_get,
111- .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DICT_SUBCLASS ,
110+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_LIST_SUBCLASS ,
112111 .tp_doc = PyDoc_STR (" Javascript Array proxy list" ),
113112 .tp_traverse = (traverseproc)JSArrayProxyMethodDefinitions::JSArrayProxy_traverse,
114113 .tp_clear = (inquiry)JSArrayProxyMethodDefinitions::JSArrayProxy_clear_slot,
0 commit comments