Skip to content

Commit

Permalink
Tweak memory allocator usage for PyParallel.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpn committed Jun 14, 2015
1 parent 81f3e39 commit 8dbc3e0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/pyodbc.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,21 @@ void* _pyodbc_malloc(const char* filename, int lineno, size_t len);
void pyodbc_free(void* p);
void pyodbc_leak_check();
#else
#define pyodbc_malloc PyObject_MALLOC
#define pyodbc_free PyObject_FREE
static __inline
void *
pyodbc_malloc(size_t n)
{
return PyObject_MALLOC(n);
}

static __inline
void
pyodbc_free(void *p)
{
PyObject_FREE(p);
}
//#define pyodbc_malloc PyObject_MALLOC
//#define pyodbc_free PyObject_FREE
#endif

void PrintBytes(void* p, size_t len);
Expand Down

0 comments on commit 8dbc3e0

Please sign in to comment.