mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-13 14:54:17 +00:00
dos2unix
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6242 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
797d7c5701
commit
89ecc93992
15 files changed
+4713
-4713
No files matched your search
@@ -1,39 +1,39 @@
|
||||
/*
|
||||
File: exprmem.c
|
||||
Auth: Brian Allen Vanderburg II
|
||||
Date: Wednesday, April 30, 2003
|
||||
Desc: Memory functions for ExprEval
|
||||
|
||||
This file is part of ExprEval.
|
||||
*/
|
||||
|
||||
/* Includes */
|
||||
#include "exprincl.h"
|
||||
|
||||
#include "exprmem.h"
|
||||
|
||||
/* Allocate memory and zero it */
|
||||
void* exprAllocMem(size_t size)
|
||||
{
|
||||
void *data = malloc(size);
|
||||
|
||||
if(data)
|
||||
{
|
||||
memset(data, 0, size);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/* Free memory */
|
||||
void exprFreeMem(void *data)
|
||||
{
|
||||
if(data)
|
||||
free(data);
|
||||
}
|
||||
|
||||
/* Allocate a list of nodes */
|
||||
exprNode *exprAllocNodes(size_t count)
|
||||
{
|
||||
return exprAllocMem(count * sizeof(exprNode));
|
||||
}
|
||||
/*
|
||||
File: exprmem.c
|
||||
Auth: Brian Allen Vanderburg II
|
||||
Date: Wednesday, April 30, 2003
|
||||
Desc: Memory functions for ExprEval
|
||||
|
||||
This file is part of ExprEval.
|
||||
*/
|
||||
|
||||
/* Includes */
|
||||
#include "exprincl.h"
|
||||
|
||||
#include "exprmem.h"
|
||||
|
||||
/* Allocate memory and zero it */
|
||||
void* exprAllocMem(size_t size)
|
||||
{
|
||||
void *data = malloc(size);
|
||||
|
||||
if(data)
|
||||
{
|
||||
memset(data, 0, size);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/* Free memory */
|
||||
void exprFreeMem(void *data)
|
||||
{
|
||||
if(data)
|
||||
free(data);
|
||||
}
|
||||
|
||||
/* Allocate a list of nodes */
|
||||
exprNode *exprAllocNodes(size_t count)
|
||||
{
|
||||
return exprAllocMem(count * sizeof(exprNode));
|
||||
}
|
||||
Reference in new issue
Block a user