2013-11-28 03:04 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbmxml/3rd/minixml/mxml_fil.c
! fixed mxmlLoadString() with top node - patch by Franček Prijatelj
* contrib/hbmxml/core.c
! fixed mxml node reference counter in mxmlAdd() - it fixes 2-dn
problem reported by Franček Prijatelj
This commit is contained in:
@@ -10,6 +10,14 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2013-11-28 03:04 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/hbmxml/3rd/minixml/mxml_fil.c
|
||||
! fixed mxmlLoadString() with top node - patch by Franček Prijatelj
|
||||
|
||||
* contrib/hbmxml/core.c
|
||||
! fixed mxml node reference counter in mxmlAdd() - it fixes 2-dn
|
||||
problem reported by Franček Prijatelj
|
||||
|
||||
2013-11-27 20:32 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/rtl/gtxwc/gtxwc.c
|
||||
! fixed typo which broke event loop processing - changed state
|
||||
|
||||
@@ -2091,7 +2091,7 @@ mxml_load_data(
|
||||
{
|
||||
node = parent;
|
||||
|
||||
while (parent->parent != top && parent->parent)
|
||||
while (parent != top && parent->parent)
|
||||
parent = parent->parent;
|
||||
|
||||
if (node != parent)
|
||||
|
||||
@@ -272,6 +272,19 @@ HB_FUNC( HB_MXMLVERSION )
|
||||
|
||||
/* void mxmlAdd( mxml_node_t * parent, int where, mxml_node_t * child, mxml_node_t * node ) */
|
||||
|
||||
/* mxmlAdd() does not update reference counters, we use our own
|
||||
* wrapper which does it [druzus]
|
||||
*/
|
||||
|
||||
static void mxmlAddRef( mxml_node_t * parent, int where, mxml_node_t * child, mxml_node_t * node )
|
||||
{
|
||||
mxml_node_t * old_parent = node->parent;
|
||||
|
||||
mxmlAdd( parent, where, ( child != NULL ) ? child : MXML_ADD_TO_PARENT, node );
|
||||
if( ! old_parent )
|
||||
mxmlRetain( node );
|
||||
}
|
||||
|
||||
HB_FUNC( MXMLADD )
|
||||
{
|
||||
mxml_node_t * parent = mxml_node_param( 1 );
|
||||
@@ -283,7 +296,7 @@ HB_FUNC( MXMLADD )
|
||||
{
|
||||
where = ( where == MXML_ADD_BEFORE ) ? MXML_ADD_BEFORE : MXML_ADD_AFTER;
|
||||
|
||||
mxmlAdd( parent, where, ( child != NULL ) ? child : MXML_ADD_TO_PARENT, node );
|
||||
mxmlAddRef( parent, where, ( child != NULL ) ? child : MXML_ADD_TO_PARENT, node );
|
||||
}
|
||||
else
|
||||
MXML_ERR_ARGS;
|
||||
|
||||
Reference in New Issue
Block a user