Use gdbpy_enter in py-finishbreakpoint.c
[deliverable/binutils-gdb.git] / gdb / python / py-param.c
1 /* GDB parameters implemented in Python
2
3 Copyright (C) 2008-2017 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20
21 #include "defs.h"
22 #include "value.h"
23 #include "python-internal.h"
24 #include "charset.h"
25 #include "gdbcmd.h"
26 #include "cli/cli-decode.h"
27 #include "completer.h"
28 #include "language.h"
29 #include "arch-utils.h"
30 #include "py-ref.h"
31
32 /* Parameter constants and their values. */
33 struct parm_constant
34 {
35 char *name;
36 int value;
37 };
38
39 struct parm_constant parm_constants[] =
40 {
41 { "PARAM_BOOLEAN", var_boolean }, /* ARI: var_boolean */
42 { "PARAM_AUTO_BOOLEAN", var_auto_boolean },
43 { "PARAM_UINTEGER", var_uinteger },
44 { "PARAM_INTEGER", var_integer },
45 { "PARAM_STRING", var_string },
46 { "PARAM_STRING_NOESCAPE", var_string_noescape },
47 { "PARAM_OPTIONAL_FILENAME", var_optional_filename },
48 { "PARAM_FILENAME", var_filename },
49 { "PARAM_ZINTEGER", var_zinteger },
50 { "PARAM_ENUM", var_enum },
51 { NULL, 0 }
52 };
53
54 /* A union that can hold anything described by enum var_types. */
55 union parmpy_variable
56 {
57 /* Hold an integer value, for boolean and integer types. */
58 int intval;
59
60 /* Hold an auto_boolean. */
61 enum auto_boolean autoboolval;
62
63 /* Hold an unsigned integer value, for uinteger. */
64 unsigned int uintval;
65
66 /* Hold a string, for the various string types. */
67 char *stringval;
68
69 /* Hold a string, for enums. */
70 const char *cstringval;
71 };
72
73 /* A GDB parameter. */
74 struct parmpy_object
75 {
76 PyObject_HEAD
77
78 /* The type of the parameter. */
79 enum var_types type;
80
81 /* The value of the parameter. */
82 union parmpy_variable value;
83
84 /* For an enum command, the possible values. The vector is
85 allocated with xmalloc, as is each element. It is
86 NULL-terminated. */
87 const char **enumeration;
88 };
89
90 typedef struct parmpy_object parmpy_object;
91
92 extern PyTypeObject parmpy_object_type
93 CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("parmpy_object");
94
95 /* Some handy string constants. */
96 static PyObject *set_doc_cst;
97 static PyObject *show_doc_cst;
98
99 \f
100
101 /* Get an attribute. */
102 static PyObject *
103 get_attr (PyObject *obj, PyObject *attr_name)
104 {
105 if (PyString_Check (attr_name)
106 #ifdef IS_PY3K
107 && ! PyUnicode_CompareWithASCIIString (attr_name, "value"))
108 #else
109 && ! strcmp (PyString_AsString (attr_name), "value"))
110 #endif
111 {
112 parmpy_object *self = (parmpy_object *) obj;
113
114 return gdbpy_parameter_value (self->type, &self->value);
115 }
116
117 return PyObject_GenericGetAttr (obj, attr_name);
118 }
119
120 /* Set a parameter value from a Python value. Return 0 on success. Returns
121 -1 on error, with a python exception set. */
122 static int
123 set_parameter_value (parmpy_object *self, PyObject *value)
124 {
125 int cmp;
126
127 switch (self->type)
128 {
129 case var_string:
130 case var_string_noescape:
131 case var_optional_filename:
132 case var_filename:
133 if (! gdbpy_is_string (value)
134 && (self->type == var_filename
135 || value != Py_None))
136 {
137 PyErr_SetString (PyExc_RuntimeError,
138 _("String required for filename."));
139
140 return -1;
141 }
142 if (value == Py_None)
143 {
144 xfree (self->value.stringval);
145 if (self->type == var_optional_filename)
146 self->value.stringval = xstrdup ("");
147 else
148 self->value.stringval = NULL;
149 }
150 else
151 {
152 gdb::unique_xmalloc_ptr<char>
153 string (python_string_to_host_string (value));
154 if (string == NULL)
155 return -1;
156
157 xfree (self->value.stringval);
158 self->value.stringval = string.release ();
159 }
160 break;
161
162 case var_enum:
163 {
164 int i;
165
166 if (! gdbpy_is_string (value))
167 {
168 PyErr_SetString (PyExc_RuntimeError,
169 _("ENUM arguments must be a string."));
170 return -1;
171 }
172
173 gdb::unique_xmalloc_ptr<char>
174 str (python_string_to_host_string (value));
175 if (str == NULL)
176 return -1;
177 for (i = 0; self->enumeration[i]; ++i)
178 if (! strcmp (self->enumeration[i], str.get ()))
179 break;
180 if (! self->enumeration[i])
181 {
182 PyErr_SetString (PyExc_RuntimeError,
183 _("The value must be member of an enumeration."));
184 return -1;
185 }
186 self->value.cstringval = self->enumeration[i];
187 break;
188 }
189
190 case var_boolean:
191 if (! PyBool_Check (value))
192 {
193 PyErr_SetString (PyExc_RuntimeError,
194 _("A boolean argument is required."));
195 return -1;
196 }
197 cmp = PyObject_IsTrue (value);
198 if (cmp < 0)
199 return -1;
200 self->value.intval = cmp;
201 break;
202
203 case var_auto_boolean:
204 if (! PyBool_Check (value) && value != Py_None)
205 {
206 PyErr_SetString (PyExc_RuntimeError,
207 _("A boolean or None is required"));
208 return -1;
209 }
210
211 if (value == Py_None)
212 self->value.autoboolval = AUTO_BOOLEAN_AUTO;
213 else
214 {
215 cmp = PyObject_IsTrue (value);
216 if (cmp < 0 )
217 return -1;
218 if (cmp == 1)
219 self->value.autoboolval = AUTO_BOOLEAN_TRUE;
220 else
221 self->value.autoboolval = AUTO_BOOLEAN_FALSE;
222 }
223 break;
224
225 case var_integer:
226 case var_zinteger:
227 case var_uinteger:
228 {
229 long l;
230 int ok;
231
232 if (! PyInt_Check (value))
233 {
234 PyErr_SetString (PyExc_RuntimeError,
235 _("The value must be integer."));
236 return -1;
237 }
238
239 if (! gdb_py_int_as_long (value, &l))
240 return -1;
241
242 if (self->type == var_uinteger)
243 {
244 ok = (l >= 0 && l <= UINT_MAX);
245 if (l == 0)
246 l = UINT_MAX;
247 }
248 else if (self->type == var_integer)
249 {
250 ok = (l >= INT_MIN && l <= INT_MAX);
251 if (l == 0)
252 l = INT_MAX;
253 }
254 else
255 ok = (l >= INT_MIN && l <= INT_MAX);
256
257 if (! ok)
258 {
259 PyErr_SetString (PyExc_RuntimeError,
260 _("Range exceeded."));
261 return -1;
262 }
263
264 self->value.intval = (int) l;
265 break;
266 }
267
268 default:
269 PyErr_SetString (PyExc_RuntimeError,
270 _("Unhandled type in parameter value."));
271 return -1;
272 }
273
274 return 0;
275 }
276
277 /* Set an attribute. Returns -1 on error, with a python exception set. */
278 static int
279 set_attr (PyObject *obj, PyObject *attr_name, PyObject *val)
280 {
281 if (PyString_Check (attr_name)
282 #ifdef IS_PY3K
283 && ! PyUnicode_CompareWithASCIIString (attr_name, "value"))
284 #else
285 && ! strcmp (PyString_AsString (attr_name), "value"))
286 #endif
287 {
288 if (!val)
289 {
290 PyErr_SetString (PyExc_RuntimeError,
291 _("Cannot delete a parameter's value."));
292 return -1;
293 }
294 return set_parameter_value ((parmpy_object *) obj, val);
295 }
296
297 return PyObject_GenericSetAttr (obj, attr_name, val);
298 }
299
300 /* A helper function which returns a documentation string for an
301 object. */
302
303 static gdb::unique_xmalloc_ptr<char>
304 get_doc_string (PyObject *object, PyObject *attr)
305 {
306 gdb::unique_xmalloc_ptr<char> result;
307
308 if (PyObject_HasAttr (object, attr))
309 {
310 PyObject *ds_obj = PyObject_GetAttr (object, attr);
311
312 if (ds_obj && gdbpy_is_string (ds_obj))
313 {
314 result = python_string_to_host_string (ds_obj);
315 if (result == NULL)
316 gdbpy_print_stack ();
317 }
318 Py_XDECREF (ds_obj);
319 }
320 if (! result)
321 result.reset (xstrdup (_("This command is not documented.")));
322 return result;
323 }
324
325 /* Helper function which will execute a METHOD in OBJ passing the
326 argument ARG. ARG can be NULL. METHOD should return a Python
327 string. If this function returns NULL, there has been an error and
328 the appropriate exception set. */
329 static gdb::unique_xmalloc_ptr<char>
330 call_doc_function (PyObject *obj, PyObject *method, PyObject *arg)
331 {
332 gdb::unique_xmalloc_ptr<char> data;
333 gdbpy_ref result (PyObject_CallMethodObjArgs (obj, method, arg, NULL));
334
335 if (result == NULL)
336 return NULL;
337
338 if (gdbpy_is_string (result.get ()))
339 {
340 data = python_string_to_host_string (result.get ());
341 if (! data)
342 return NULL;
343 }
344 else
345 {
346 PyErr_SetString (PyExc_RuntimeError,
347 _("Parameter must return a string value."));
348 return NULL;
349 }
350
351 return data;
352 }
353
354 /* A callback function that is registered against the respective
355 add_setshow_* set_doc prototype. This function will either call
356 the Python function "get_set_string" or extract the Python
357 attribute "set_doc" and return the contents as a string. If
358 neither exist, insert a string indicating the Parameter is not
359 documented. */
360 static void
361 get_set_value (char *args, int from_tty,
362 struct cmd_list_element *c)
363 {
364 PyObject *obj = (PyObject *) get_cmd_context (c);
365 gdb::unique_xmalloc_ptr<char> set_doc_string;
366 struct cleanup *cleanup = ensure_python_env (get_current_arch (),
367 current_language);
368 PyObject *set_doc_func = PyString_FromString ("get_set_string");
369
370 if (! set_doc_func)
371 goto error;
372
373 if (PyObject_HasAttr (obj, set_doc_func))
374 {
375 set_doc_string = call_doc_function (obj, set_doc_func, NULL);
376 if (! set_doc_string)
377 goto error;
378 }
379 else
380 {
381 /* We have to preserve the existing < GDB 7.3 API. If a
382 callback function does not exist, then attempt to read the
383 set_doc attribute. */
384 set_doc_string = get_doc_string (obj, set_doc_cst);
385 }
386
387 fprintf_filtered (gdb_stdout, "%s\n", set_doc_string.get ());
388
389 Py_XDECREF (set_doc_func);
390 do_cleanups (cleanup);
391 return;
392
393 error:
394 Py_XDECREF (set_doc_func);
395 gdbpy_print_stack ();
396 do_cleanups (cleanup);
397 return;
398 }
399
400 /* A callback function that is registered against the respective
401 add_setshow_* show_doc prototype. This function will either call
402 the Python function "get_show_string" or extract the Python
403 attribute "show_doc" and return the contents as a string. If
404 neither exist, insert a string indicating the Parameter is not
405 documented. */
406 static void
407 get_show_value (struct ui_file *file, int from_tty,
408 struct cmd_list_element *c,
409 const char *value)
410 {
411 PyObject *obj = (PyObject *) get_cmd_context (c);
412 gdb::unique_xmalloc_ptr<char> show_doc_string;
413 struct cleanup *cleanup = ensure_python_env (get_current_arch (),
414 current_language);
415 PyObject *show_doc_func = PyString_FromString ("get_show_string");
416
417 if (! show_doc_func)
418 goto error;
419
420 if (PyObject_HasAttr (obj, show_doc_func))
421 {
422 PyObject *val_obj = PyString_FromString (value);
423
424 if (! val_obj)
425 goto error;
426
427 show_doc_string = call_doc_function (obj, show_doc_func, val_obj);
428 Py_DECREF (val_obj);
429 if (! show_doc_string)
430 goto error;
431
432 fprintf_filtered (file, "%s\n", show_doc_string.get ());
433 }
434 else
435 {
436 /* We have to preserve the existing < GDB 7.3 API. If a
437 callback function does not exist, then attempt to read the
438 show_doc attribute. */
439 show_doc_string = get_doc_string (obj, show_doc_cst);
440 fprintf_filtered (file, "%s %s\n", show_doc_string.get (), value);
441 }
442
443 Py_XDECREF (show_doc_func);
444 do_cleanups (cleanup);
445 return;
446
447 error:
448 Py_XDECREF (show_doc_func);
449 gdbpy_print_stack ();
450 do_cleanups (cleanup);
451 return;
452 }
453 \f
454
455 /* A helper function that dispatches to the appropriate add_setshow
456 function. */
457 static void
458 add_setshow_generic (int parmclass, enum command_class cmdclass,
459 char *cmd_name, parmpy_object *self,
460 char *set_doc, char *show_doc, char *help_doc,
461 struct cmd_list_element **set_list,
462 struct cmd_list_element **show_list)
463 {
464 struct cmd_list_element *param = NULL;
465 const char *tmp_name = NULL;
466
467 switch (parmclass)
468 {
469 case var_boolean:
470
471 add_setshow_boolean_cmd (cmd_name, cmdclass,
472 &self->value.intval, set_doc, show_doc,
473 help_doc, get_set_value, get_show_value,
474 set_list, show_list);
475
476 break;
477
478 case var_auto_boolean:
479 add_setshow_auto_boolean_cmd (cmd_name, cmdclass,
480 &self->value.autoboolval,
481 set_doc, show_doc, help_doc,
482 get_set_value, get_show_value,
483 set_list, show_list);
484 break;
485
486 case var_uinteger:
487 add_setshow_uinteger_cmd (cmd_name, cmdclass,
488 &self->value.uintval, set_doc, show_doc,
489 help_doc, get_set_value, get_show_value,
490 set_list, show_list);
491 break;
492
493 case var_integer:
494 add_setshow_integer_cmd (cmd_name, cmdclass,
495 &self->value.intval, set_doc, show_doc,
496 help_doc, get_set_value, get_show_value,
497 set_list, show_list); break;
498
499 case var_string:
500 add_setshow_string_cmd (cmd_name, cmdclass,
501 &self->value.stringval, set_doc, show_doc,
502 help_doc, get_set_value, get_show_value,
503 set_list, show_list); break;
504
505 case var_string_noescape:
506 add_setshow_string_noescape_cmd (cmd_name, cmdclass,
507 &self->value.stringval,
508 set_doc, show_doc, help_doc,
509 get_set_value, get_show_value,
510 set_list, show_list);
511
512 break;
513
514 case var_optional_filename:
515 add_setshow_optional_filename_cmd (cmd_name, cmdclass,
516 &self->value.stringval, set_doc,
517 show_doc, help_doc, get_set_value,
518 get_show_value, set_list,
519 show_list);
520 break;
521
522 case var_filename:
523 add_setshow_filename_cmd (cmd_name, cmdclass,
524 &self->value.stringval, set_doc, show_doc,
525 help_doc, get_set_value, get_show_value,
526 set_list, show_list); break;
527
528 case var_zinteger:
529 add_setshow_zinteger_cmd (cmd_name, cmdclass,
530 &self->value.intval, set_doc, show_doc,
531 help_doc, get_set_value, get_show_value,
532 set_list, show_list);
533 break;
534
535 case var_enum:
536 add_setshow_enum_cmd (cmd_name, cmdclass, self->enumeration,
537 &self->value.cstringval, set_doc, show_doc,
538 help_doc, get_set_value, get_show_value,
539 set_list, show_list);
540 /* Initialize the value, just in case. */
541 self->value.cstringval = self->enumeration[0];
542 break;
543 }
544
545 /* Lookup created parameter, and register Python object against the
546 parameter context. Perform this task against both lists. */
547 tmp_name = cmd_name;
548 param = lookup_cmd (&tmp_name, *show_list, "", 0, 1);
549 if (param)
550 set_cmd_context (param, self);
551
552 tmp_name = cmd_name;
553 param = lookup_cmd (&tmp_name, *set_list, "", 0, 1);
554 if (param)
555 set_cmd_context (param, self);
556 }
557
558 /* A helper which computes enum values. Returns 1 on success. Returns 0 on
559 error, with a python exception set. */
560 static int
561 compute_enum_values (parmpy_object *self, PyObject *enum_values)
562 {
563 Py_ssize_t size, i;
564 struct cleanup *back_to;
565
566 if (! enum_values)
567 {
568 PyErr_SetString (PyExc_RuntimeError,
569 _("An enumeration is required for PARAM_ENUM."));
570 return 0;
571 }
572
573 if (! PySequence_Check (enum_values))
574 {
575 PyErr_SetString (PyExc_RuntimeError,
576 _("The enumeration is not a sequence."));
577 return 0;
578 }
579
580 size = PySequence_Size (enum_values);
581 if (size < 0)
582 return 0;
583 if (size == 0)
584 {
585 PyErr_SetString (PyExc_RuntimeError,
586 _("The enumeration is empty."));
587 return 0;
588 }
589
590 self->enumeration = XCNEWVEC (const char *, size + 1);
591 back_to = make_cleanup (free_current_contents, &self->enumeration);
592
593 for (i = 0; i < size; ++i)
594 {
595 PyObject *item = PySequence_GetItem (enum_values, i);
596
597 if (! item)
598 {
599 do_cleanups (back_to);
600 return 0;
601 }
602 if (! gdbpy_is_string (item))
603 {
604 Py_DECREF (item);
605 do_cleanups (back_to);
606 PyErr_SetString (PyExc_RuntimeError,
607 _("The enumeration item not a string."));
608 return 0;
609 }
610 self->enumeration[i] = python_string_to_host_string (item).release ();
611 Py_DECREF (item);
612 if (self->enumeration[i] == NULL)
613 {
614 do_cleanups (back_to);
615 return 0;
616 }
617 make_cleanup (xfree, (char *) self->enumeration[i]);
618 }
619
620 discard_cleanups (back_to);
621 return 1;
622 }
623
624 /* Object initializer; sets up gdb-side structures for command.
625
626 Use: __init__(NAME, CMDCLASS, PARMCLASS, [ENUM])
627
628 NAME is the name of the parameter. It may consist of multiple
629 words, in which case the final word is the name of the new command,
630 and earlier words must be prefix commands.
631
632 CMDCLASS is the kind of command. It should be one of the COMMAND_*
633 constants defined in the gdb module.
634
635 PARMCLASS is the type of the parameter. It should be one of the
636 PARAM_* constants defined in the gdb module.
637
638 If PARMCLASS is PARAM_ENUM, then the final argument should be a
639 collection of strings. These strings are the valid values for this
640 parameter.
641
642 The documentation for the parameter is taken from the doc string
643 for the python class.
644
645 Returns -1 on error, with a python exception set. */
646
647 static int
648 parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
649 {
650 parmpy_object *obj = (parmpy_object *) self;
651 const char *name;
652 char *set_doc, *show_doc, *doc;
653 char *cmd_name;
654 int parmclass, cmdtype;
655 PyObject *enum_values = NULL;
656 struct cmd_list_element **set_list, **show_list;
657
658 if (! PyArg_ParseTuple (args, "sii|O", &name, &cmdtype, &parmclass,
659 &enum_values))
660 return -1;
661
662 if (cmdtype != no_class && cmdtype != class_run
663 && cmdtype != class_vars && cmdtype != class_stack
664 && cmdtype != class_files && cmdtype != class_support
665 && cmdtype != class_info && cmdtype != class_breakpoint
666 && cmdtype != class_trace && cmdtype != class_obscure
667 && cmdtype != class_maintenance)
668 {
669 PyErr_Format (PyExc_RuntimeError, _("Invalid command class argument."));
670 return -1;
671 }
672
673 if (parmclass != var_boolean /* ARI: var_boolean */
674 && parmclass != var_auto_boolean
675 && parmclass != var_uinteger && parmclass != var_integer
676 && parmclass != var_string && parmclass != var_string_noescape
677 && parmclass != var_optional_filename && parmclass != var_filename
678 && parmclass != var_zinteger && parmclass != var_enum)
679 {
680 PyErr_SetString (PyExc_RuntimeError,
681 _("Invalid parameter class argument."));
682 return -1;
683 }
684
685 if (enum_values && parmclass != var_enum)
686 {
687 PyErr_SetString (PyExc_RuntimeError,
688 _("Only PARAM_ENUM accepts a fourth argument."));
689 return -1;
690 }
691 if (parmclass == var_enum)
692 {
693 if (! compute_enum_values (obj, enum_values))
694 return -1;
695 }
696 else
697 obj->enumeration = NULL;
698 obj->type = (enum var_types) parmclass;
699 memset (&obj->value, 0, sizeof (obj->value));
700
701 cmd_name = gdbpy_parse_command_name (name, &set_list,
702 &setlist);
703
704 if (! cmd_name)
705 return -1;
706 xfree (cmd_name);
707 cmd_name = gdbpy_parse_command_name (name, &show_list,
708 &showlist);
709 if (! cmd_name)
710 return -1;
711
712 set_doc = get_doc_string (self, set_doc_cst).release ();
713 show_doc = get_doc_string (self, show_doc_cst).release ();
714 doc = get_doc_string (self, gdbpy_doc_cst).release ();
715
716 Py_INCREF (self);
717
718 TRY
719 {
720 add_setshow_generic (parmclass, (enum command_class) cmdtype,
721 cmd_name, obj,
722 set_doc, show_doc,
723 doc, set_list, show_list);
724 }
725 CATCH (except, RETURN_MASK_ALL)
726 {
727 xfree (cmd_name);
728 xfree (set_doc);
729 xfree (show_doc);
730 xfree (doc);
731 Py_DECREF (self);
732 PyErr_Format (except.reason == RETURN_QUIT
733 ? PyExc_KeyboardInterrupt : PyExc_RuntimeError,
734 "%s", except.message);
735 return -1;
736 }
737 END_CATCH
738
739 return 0;
740 }
741
742 \f
743
744 /* Initialize the 'parameters' module. */
745 int
746 gdbpy_initialize_parameters (void)
747 {
748 int i;
749
750 parmpy_object_type.tp_new = PyType_GenericNew;
751 if (PyType_Ready (&parmpy_object_type) < 0)
752 return -1;
753
754 set_doc_cst = PyString_FromString ("set_doc");
755 if (! set_doc_cst)
756 return -1;
757 show_doc_cst = PyString_FromString ("show_doc");
758 if (! show_doc_cst)
759 return -1;
760
761 for (i = 0; parm_constants[i].name; ++i)
762 {
763 if (PyModule_AddIntConstant (gdb_module,
764 parm_constants[i].name,
765 parm_constants[i].value) < 0)
766 return -1;
767 }
768
769 return gdb_pymodule_addobject (gdb_module, "Parameter",
770 (PyObject *) &parmpy_object_type);
771 }
772
773 \f
774
775 PyTypeObject parmpy_object_type =
776 {
777 PyVarObject_HEAD_INIT (NULL, 0)
778 "gdb.Parameter", /*tp_name*/
779 sizeof (parmpy_object), /*tp_basicsize*/
780 0, /*tp_itemsize*/
781 0, /*tp_dealloc*/
782 0, /*tp_print*/
783 0, /*tp_getattr*/
784 0, /*tp_setattr*/
785 0, /*tp_compare*/
786 0, /*tp_repr*/
787 0, /*tp_as_number*/
788 0, /*tp_as_sequence*/
789 0, /*tp_as_mapping*/
790 0, /*tp_hash */
791 0, /*tp_call*/
792 0, /*tp_str*/
793 get_attr, /*tp_getattro*/
794 set_attr, /*tp_setattro*/
795 0, /*tp_as_buffer*/
796 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
797 "GDB parameter object", /* tp_doc */
798 0, /* tp_traverse */
799 0, /* tp_clear */
800 0, /* tp_richcompare */
801 0, /* tp_weaklistoffset */
802 0, /* tp_iter */
803 0, /* tp_iternext */
804 0, /* tp_methods */
805 0, /* tp_members */
806 0, /* tp_getset */
807 0, /* tp_base */
808 0, /* tp_dict */
809 0, /* tp_descr_get */
810 0, /* tp_descr_set */
811 0, /* tp_dictoffset */
812 parmpy_init, /* tp_init */
813 0, /* tp_alloc */
814 };
This page took 0.046478 seconds and 4 git commands to generate.