SF.net SVN: geany:[3786] branches/unstable/tagmanager/python.c
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue May 12 15:11:54 UTC 2009
Revision: 3786
http://geany.svn.sourceforge.net/geany/?rev=3786&view=rev
Author: ntrel
Date: 2009-05-12 15:11:54 +0000 (Tue, 12 May 2009)
Log Message:
-----------
Use nestingLevelsPush() in addNestingLevel().
Modified Paths:
--------------
branches/unstable/tagmanager/python.c
Modified: branches/unstable/tagmanager/python.c
===================================================================
--- branches/unstable/tagmanager/python.c 2009-05-12 14:59:29 UTC (rev 3785)
+++ branches/unstable/tagmanager/python.c 2009-05-12 15:11:54 UTC (rev 3786)
@@ -327,18 +327,14 @@
}
if (i == nls->n)
{
- if (i >= nls->allocated)
- {
- nls->allocated++;
- nls->levels = xRealloc(nls->levels,
- nls->allocated, NestingLevel);
- nls->levels[i].name = vStringNew();
- }
+ nestingLevelsPush(nls, name, 0);
nl = nls->levels + i;
}
- nls->n = i + 1;
-
- vStringCopy(nl->name, name);
+ else
+ { /* reuse existing slot */
+ nls->n = i + 1;
+ vStringCopy(nl->name, name);
+ }
nl->indentation = indentation;
nl->type = is_class ? K_CLASS : !K_CLASS;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list