mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:35:10 +00:00
[ADD/FIX/WIP] "Fix" concurrency, prepare XEP-0421
I'll need to break down my commits more...
This commit is contained in:
parent
a686449a4d
commit
63c1bc819e
14 changed files with 356 additions and 162 deletions
|
|
@ -4,6 +4,8 @@
|
|||
#include <Cytoplasm/Str.h>
|
||||
#include <Cytoplasm/Log.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
XMLElement *
|
||||
XMLCreateTag(char *name)
|
||||
{
|
||||
|
|
@ -43,8 +45,10 @@ XMLCreateText(char *data)
|
|||
elem->data = StrDuplicate(data);
|
||||
|
||||
return elem;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
XMLAddAttr(XMLElement *element, char *key, char *val)
|
||||
{
|
||||
|
|
@ -52,12 +56,12 @@ XMLAddAttr(XMLElement *element, char *key, char *val)
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (element->type != XML_ELEMENT_TAG)
|
||||
if (element->type != XML_ELEMENT_TAG || !element->attrs)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
HashMapSet(element->attrs, key, StrDuplicate(val));
|
||||
Free(HashMapSet(element->attrs, key, StrDuplicate(val)));
|
||||
}
|
||||
void
|
||||
XMLAddChild(XMLElement *element, XMLElement *child)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue