fix %extend(%typemaps + %fragments) before class declaration

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8011 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-12-19 10:46:41 +00:00
commit a4d5b788a6
3 changed files with 55 additions and 3 deletions

View file

@ -149,6 +149,30 @@ appendChild(Node *node, Node *chd) {
set_lastChild(node,lc);
}
/* -----------------------------------------------------------------------------
* preppendChild()
*
* Preppends a new child to a node
* ----------------------------------------------------------------------------- */
void
preppendChild(Node *node, Node *chd) {
Node *fc;
if (!chd) return;
fc = firstChild(node);
if (fc) {
set_nextSibling(chd,fc);
set_previousSibling(fc,chd);
}
set_firstChild(node,chd);
while (chd) {
set_parentNode(chd,node);
chd = nextSibling(chd);
}
}
/* -----------------------------------------------------------------------------
* deleteNode()
*