Kaydet (Commit) fb32fa98 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz Kaydeden (comit) GitHub

Bir değişikliklik yapıldı kontrol edilmeli

Node_type problemini düzeltebilmek amacı ile bazı satırlarda değişim yaptım. Hata alacağımın farkındayım ama çıkmadık candan ümit kesilmez :) eve geçince baştan başa kontrol etmem şart
üst 6157741b
...@@ -168,6 +168,65 @@ static PyTypeObject Iter_type = { ...@@ -168,6 +168,65 @@ static PyTypeObject Iter_type = {
/*başka bir şekilde yapıyorduk ama nasıl? */ /*başka bir şekilde yapıyorduk ama nasıl? */
/******************************************/ /******************************************/
static PyMethodDef Node_methods[] = {
{ "type", (PyCFunction)Node_type_func, METH_NOARGS,
"Return the type of node." },
{ "__reduce__", (PyCFunction)Node_reduce, METH_NOARGS,
"used by pickle" },
{ "name", (PyCFunction)Node_name, METH_NOARGS,
"Return tag name." },
{ "data", (PyCFunction)Node_data, METH_NOARGS,
"Return node's character data." },
{ "setData", (PyCFunction)Node_setData, METH_VARARGS,
"Set character data child of the tag." },
{ "attributes", (PyCFunction)Node_attributes, METH_NOARGS,
"Return node's attribute names." },
{ "getAttribute", (PyCFunction)Node_getAttribute, METH_VARARGS,
"Return value of a tag attribute." },
{ "setAttribute", (PyCFunction)Node_setAttribute, METH_VARARGS,
"Set the value of a tag attribute." },
{ "getTag", (PyCFunction)Node_getTag, METH_VARARGS,
"Return first child tag with the given name." },
{ "getTagData", (PyCFunction)Node_getTagData, METH_VARARGS,
"Return character data of the child tag with given name." },
{ "tags", (PyCFunction)Node_tags, METH_VARARGS,
"Iterate over all or optionally only matching tags." },
{ "firstChild", (PyCFunction)Node_firstChild, METH_NOARGS,
"Return first child node." },
{ "parent", (PyCFunction)Node_parent, METH_NOARGS,
"Return parent node." },
{ "root", (PyCFunction)Node_root, METH_NOARGS,
"Return topmost parent node." },
{ "nextTag", (PyCFunction)Node_nextTag, METH_VARARGS,
"Return next sibling tag node." },
{ "next", (PyCFunction)Node_next, METH_NOARGS,
"Return next sibling node." },
{ "previousTag", (PyCFunction)Node_previousTag, METH_VARARGS,
"Return previous sibling tag node." },
{ "previous", (PyCFunction)Node_previous, METH_NOARGS,
"Return previous sibling node." },
{ "toString", (PyCFunction)Node_toString, METH_NOARGS,
"Convert a document tree to XML string representation." },
{ "toPrettyString", (PyCFunction)Node_toPrettyString, METH_NOARGS,
"Convert a document tree to indented XML string representation." },
{ "insertTag", (PyCFunction)Node_insertTag, METH_VARARGS,
"Insert a child tag node with given name." },
{ "appendTag", (PyCFunction)Node_appendSibling, METH_VARARGS,
"Append a sibling tag node with given name." },
{ "prependTag", (PyCFunction)Node_prependTag, METH_VARARGS,
"Prepend a sibling tag node with given name." },
{ "insertData", (PyCFunction)Node_insertData, METH_VARARGS,
"Insert a child character data node with given text." },
{ "appendData", (PyCFunction)Node_appendSiblingData, METH_VARARGS,
"Append a sibling character data node with given text." },
{ "prependData", (PyCFunction)Node_prependData, METH_VARARGS,
"Prepend a sibling character data node with given text." },
{ "insertNode", (PyCFunction)Node_insertNode, METH_VARARGS,
"Insert another document as a child." },
{ "hide", (PyCFunction)Node_hide, METH_VARARGS,
"Hide tag from document tree." },
{ NULL }
};
static PyObject * static PyObject *
new_node(Document *doc, iks *xml) new_node(Document *doc, iks *xml)
{ {
...@@ -790,66 +849,6 @@ Node_hide(Node *self, PyObject *args) ...@@ -790,66 +849,6 @@ Node_hide(Node *self, PyObject *args)
return Py_None; return Py_None;
} }
static PyMethodDef Node_methods[] = {
{ "type", (PyCFunction)Node_type_func, METH_NOARGS,
"Return the type of node." },
{ "__reduce__", (PyCFunction)Node_reduce, METH_NOARGS,
"used by pickle" },
{ "name", (PyCFunction)Node_name, METH_NOARGS,
"Return tag name." },
{ "data", (PyCFunction)Node_data, METH_NOARGS,
"Return node's character data." },
{ "setData", (PyCFunction)Node_setData, METH_VARARGS,
"Set character data child of the tag." },
{ "attributes", (PyCFunction)Node_attributes, METH_NOARGS,
"Return node's attribute names." },
{ "getAttribute", (PyCFunction)Node_getAttribute, METH_VARARGS,
"Return value of a tag attribute." },
{ "setAttribute", (PyCFunction)Node_setAttribute, METH_VARARGS,
"Set the value of a tag attribute." },
{ "getTag", (PyCFunction)Node_getTag, METH_VARARGS,
"Return first child tag with the given name." },
{ "getTagData", (PyCFunction)Node_getTagData, METH_VARARGS,
"Return character data of the child tag with given name." },
{ "tags", (PyCFunction)Node_tags, METH_VARARGS,
"Iterate over all or optionally only matching tags." },
{ "firstChild", (PyCFunction)Node_firstChild, METH_NOARGS,
"Return first child node." },
{ "parent", (PyCFunction)Node_parent, METH_NOARGS,
"Return parent node." },
{ "root", (PyCFunction)Node_root, METH_NOARGS,
"Return topmost parent node." },
{ "nextTag", (PyCFunction)Node_nextTag, METH_VARARGS,
"Return next sibling tag node." },
{ "next", (PyCFunction)Node_next, METH_NOARGS,
"Return next sibling node." },
{ "previousTag", (PyCFunction)Node_previousTag, METH_VARARGS,
"Return previous sibling tag node." },
{ "previous", (PyCFunction)Node_previous, METH_NOARGS,
"Return previous sibling node." },
{ "toString", (PyCFunction)Node_toString, METH_NOARGS,
"Convert a document tree to XML string representation." },
{ "toPrettyString", (PyCFunction)Node_toPrettyString, METH_NOARGS,
"Convert a document tree to indented XML string representation." },
{ "insertTag", (PyCFunction)Node_insertTag, METH_VARARGS,
"Insert a child tag node with given name." },
{ "appendTag", (PyCFunction)Node_appendSibling, METH_VARARGS,
"Append a sibling tag node with given name." },
{ "prependTag", (PyCFunction)Node_prependTag, METH_VARARGS,
"Prepend a sibling tag node with given name." },
{ "insertData", (PyCFunction)Node_insertData, METH_VARARGS,
"Insert a child character data node with given text." },
{ "appendData", (PyCFunction)Node_appendSiblingData, METH_VARARGS,
"Append a sibling character data node with given text." },
{ "prependData", (PyCFunction)Node_prependData, METH_VARARGS,
"Prepend a sibling character data node with given text." },
{ "insertNode", (PyCFunction)Node_insertNode, METH_VARARGS,
"Insert another document as a child." },
{ "hide", (PyCFunction)Node_hide, METH_VARARGS,
"Hide tag from document tree." },
{ NULL }
};
static PyTypeObject Node_type = { static PyTypeObject Node_type = {
PyVarObject_HEAD_INIT(NULL,0) PyVarObject_HEAD_INIT(NULL,0)
"piksemel.Node", /* tp_name */ "piksemel.Node", /* tp_name */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment