SF.net SVN: geany: [1600] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Mon Jun 4 16:51:53 UTC 2007
Revision: 1600
http://svn.sourceforge.net/geany/?rev=1600&view=rev
Author: eht16
Date: 2007-06-04 09:51:53 -0700 (Mon, 04 Jun 2007)
Log Message:
-----------
Replace malloc() by g_malloc().
Modified Paths:
--------------
trunk/ChangeLog
trunk/tagmanager/sort.c
trunk/tagmanager/tm_workspace.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-06-04 16:12:58 UTC (rev 1599)
+++ trunk/ChangeLog 2007-06-04 16:51:53 UTC (rev 1600)
@@ -1,5 +1,7 @@
2007-06-04 Enrico Tröger <enrico.troeger at uvena.de>
+ * src/main.c: Add rpl_malloc() for better compatibility with non-GNU
+ systems (thanks to Harri Koskinen for reporting).
* po/POTFILES.in: Add navqueue.c.
* po/intl_stats.sh: Add revision time to the output.
* src/callbacks.c, src/callbacks.h:
@@ -8,16 +10,12 @@
Re-maximize the main window on startup when closed in maximized state
(closes #1730369).
* src/geany.h, src/keyfile.c, src/main.c:
- Improved code to avoid hiding the messages window
+ Improve code to avoid hiding the messages window
(caused by last commit).
+ * tagmanager/sort.c, tagmanager/tm_workspace.c:
+ Replace malloc() by g_malloc().
-2007-06-04 Enrico Tröger <enrico.troeger at uvena.de>
-
- * src/main.c: Add rpl_malloc() for better compatibility with non-GNU
- systems (thanks to Harri Koskinen for reporting).
-
-
2007-06-03 Enrico Tröger <enrico.troeger at uvena.de>
* doc/geany.docbook, src/keybindings.c, src/keybindings.h:
Modified: trunk/tagmanager/sort.c
===================================================================
--- trunk/tagmanager/sort.c 2007-06-04 16:12:58 UTC (rev 1599)
+++ trunk/tagmanager/sort.c 2007-06-04 16:51:53 UTC (rev 1600)
@@ -18,6 +18,7 @@
#endif
#include <string.h>
#include <stdio.h>
+#include <glib.h>
#include "entry.h"
#include "main.h"
@@ -63,7 +64,7 @@
PE_CONST char *const sortOrder2 = "LC_ALL=C";
const size_t length = 4 + strlen (sortOrder1) + strlen (sortOrder2) +
strlen (sortCommand) + (2 * strlen (tagFileName ()));
- char *const cmd = (char *) malloc (length + 1);
+ char *const cmd = (char *) g_malloc (length + 1);
int ret = -1;
if (cmd != NULL)
@@ -164,7 +165,7 @@
*/
size_t numTags = TagFile.numTags.added + TagFile.numTags.prev;
const size_t tableSize = numTags * sizeof (char *);
- char **const table = (char **) malloc (tableSize); /* line pointers */
+ char **const table = (char **) g_malloc (tableSize); /* line pointers */
DebugStatement ( size_t mallocSize = tableSize; ) /* cumulative total */
if (table == NULL)
@@ -190,7 +191,7 @@
{
const size_t stringSize = strlen (line) + 1;
- table [i] = (char *) malloc (stringSize);
+ table [i] = (char *) g_malloc (stringSize);
if (table [i] == NULL)
failedSort (fp, "out of memory");
DebugStatement ( mallocSize += stringSize; )
Modified: trunk/tagmanager/tm_workspace.c
===================================================================
--- trunk/tagmanager/tm_workspace.c 2007-06-04 16:12:58 UTC (rev 1599)
+++ trunk/tagmanager/tm_workspace.c 2007-06-04 16:51:53 UTC (rev 1600)
@@ -114,7 +114,7 @@
return TRUE;
}
-gboolean tm_workspace_remove_object(TMWorkObject *w, gboolean free)
+gboolean tm_workspace_remove_object(TMWorkObject *w, gboolean do_free)
{
guint i;
if ((NULL == theWorkspace) || (NULL == theWorkspace->work_objects)
@@ -124,7 +124,7 @@
{
if (theWorkspace->work_objects->pdata[i] == w)
{
- if (free)
+ if (do_free)
tm_work_object_free(w);
g_ptr_array_remove_index_fast(theWorkspace->work_objects, i);
tm_workspace_update(TM_WORK_OBJECT(theWorkspace), TRUE, FALSE, FALSE);
@@ -284,7 +284,7 @@
for(idx_inc = 0; idx_inc < includes_count; idx_inc++)
{
int dirty_len = strlen(includes[idx_inc]);
- char *clean_path = malloc(dirty_len - 1);
+ char *clean_path = g_malloc(dirty_len - 1);
strncpy(clean_path, includes[idx_inc] + 1, dirty_len - 1);
clean_path[dirty_len - 2] = 0;
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