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:
parent
67dafc531d
commit
a4d5b788a6
3 changed files with 55 additions and 3 deletions
|
|
@ -369,6 +369,7 @@ extern int checkAttribute(Node *obj, const String_or_char *name, const String_or
|
|||
#define set_lastChild(x,v) Setattr(x,"lastChild",v)
|
||||
|
||||
extern void appendChild(Node *node, Node *child);
|
||||
extern void preppendChild(Node *node, Node *child);
|
||||
extern void deleteNode(Node *node);
|
||||
extern Node *copyNode(Node *node);
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue