Changeset 16656
- Timestamp:
- 06/19/08 00:04:51 (4 months ago)
- Files:
-
- trunk/midgard/apis/python/py_midgard_object.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midgard/apis/python/py_midgard_object.c
r16655 r16656 455 455 static PyMethodDef *__midgard_object_methods_pmd() 456 456 { 457 PyMethodDef *pmd = g_new 0(PyMethodDef, 25);457 PyMethodDef *pmd = g_new(PyMethodDef, 26); 458 458 459 459 pmd[0].ml_name = "get_by_id"; … … 537 537 pmd[15].ml_doc = NULL; 538 538 539 pmd[15].ml_name = "delete_parameters"; 540 pmd[15].ml_meth = (PyCFunction)pymidgard_object_delete_parameters; 541 pmd[15].ml_flags = METH_VARARGS; 542 pmd[15].ml_doc = NULL; 543 544 pmd[16].ml_name = "purge_parameters"; 545 pmd[16].ml_meth = (PyCFunction)pymidgard_object_purge_parameters; 539 pmd[16].ml_name = "delete_parameters"; 540 pmd[16].ml_meth = (PyCFunction)pymidgard_object_delete_parameters; 546 541 pmd[16].ml_flags = METH_VARARGS; 547 542 pmd[16].ml_doc = NULL; 548 543 549 pmd[17].ml_name = " list_parameters";550 pmd[17].ml_meth = (PyCFunction)pymidgard_object_ list_parameters;544 pmd[17].ml_name = "purge_parameters"; 545 pmd[17].ml_meth = (PyCFunction)pymidgard_object_purge_parameters; 551 546 pmd[17].ml_flags = METH_VARARGS; 552 547 pmd[17].ml_doc = NULL; 553 548 554 pmd[18].ml_name = " find_parameters";555 pmd[18].ml_meth = (PyCFunction)pymidgard_object_ find_parameters;549 pmd[18].ml_name = "list_parameters"; 550 pmd[18].ml_meth = (PyCFunction)pymidgard_object_list_parameters; 556 551 pmd[18].ml_flags = METH_VARARGS; 557 552 pmd[18].ml_doc = NULL; 558 553 559 pmd[19].ml_name = " delete_attachments";560 pmd[19].ml_meth = (PyCFunction)pymidgard_object_ delete_attachments;554 pmd[19].ml_name = "find_parameters"; 555 pmd[19].ml_meth = (PyCFunction)pymidgard_object_find_parameters; 561 556 pmd[19].ml_flags = METH_VARARGS; 562 557 pmd[19].ml_doc = NULL; 563 558 564 pmd[20].ml_name = " purge_attachments";565 pmd[20].ml_meth = (PyCFunction)pymidgard_object_ purge_attachments;559 pmd[20].ml_name = "delete_attachments"; 560 pmd[20].ml_meth = (PyCFunction)pymidgard_object_delete_attachments; 566 561 pmd[20].ml_flags = METH_VARARGS; 567 562 pmd[20].ml_doc = NULL; 568 563 569 pmd[21].ml_name = " list_attachments";570 pmd[21].ml_meth = (PyCFunction)pymidgard_object_ list_attachments;564 pmd[21].ml_name = "purge_attachments"; 565 pmd[21].ml_meth = (PyCFunction)pymidgard_object_purge_attachments; 571 566 pmd[21].ml_flags = METH_VARARGS; 572 567 pmd[21].ml_doc = NULL; 573 568 574 pmd[22].ml_name = " find_attachments";575 pmd[22].ml_meth = (PyCFunction)pymidgard_object_ find_attachments;569 pmd[22].ml_name = "list_attachments"; 570 pmd[22].ml_meth = (PyCFunction)pymidgard_object_list_attachments; 576 571 pmd[22].ml_flags = METH_VARARGS; 577 572 pmd[22].ml_doc = NULL; 578 573 579 pmd[23].ml_name = " create_attachment";580 pmd[23].ml_meth = (PyCFunction)pymidgard_object_ create_attachment;574 pmd[23].ml_name = "find_attachments"; 575 pmd[23].ml_meth = (PyCFunction)pymidgard_object_find_attachments; 581 576 pmd[23].ml_flags = METH_VARARGS; 582 577 pmd[23].ml_doc = NULL; 583 578 584 pmd[24].ml_name = NULL;585 pmd[24].ml_meth = NULL;586 pmd[24].ml_flags = 0;579 pmd[24].ml_name = "create_attachment"; 580 pmd[24].ml_meth = (PyCFunction)pymidgard_object_create_attachment; 581 pmd[24].ml_flags = METH_VARARGS; 587 582 pmd[24].ml_doc = NULL; 588 583 584 pmd[25].ml_name = NULL; 585 pmd[25].ml_meth = NULL; 586 pmd[25].ml_flags = 0; 587 pmd[25].ml_doc = NULL; 588 589 589 return pmd; 590 590 } … … 593 593 { 594 594 /* initialize object type */ 595 PyTypeObject *ot = g_new (PyTypeObject, 1);595 PyTypeObject *ot = g_new0(PyTypeObject, 1); 596 596 597 597 #ifdef Py_TRACE_REFS … … 671 671 typename = g_type_name(all_types[i]); 672 672 PyTypeObject *ot = __new_object_struct(typename); 673 674 673 pygobject_register_class(d, 675 typename, all_types[i], ot, 676 Py_BuildValue("(O)", pygobject_type)); 674 typename, all_types[i], ot, NULL); 675 /* FIXME, What is a static bases in this case? */ 676 /* Py_BuildValue("(O)", pygobject_type)); */ 677 677 678 678 g_hash_table_insert(_pytype_hash,
