[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Replace flex malloc functions with Python memory management
From: |
Bastian Kleineidam |
Subject: |
Replace flex malloc functions with Python memory management |
Date: |
Wed, 12 Jun 2002 14:09:38 +0200 |
Hello,
I wrote a HTML parser in flex/bison as a Python extension module.
To use the Python memory management, I used
%{
#define malloc PyMem_Malloc
#define realloc PyMem_Realloc
#define free PyMem_Free
%}
%%
... [flex directives]
%%
#undef malloc
#undef realloc
#undef free
Perhaps it would be a feature for flex to add options for this, for example
flex-malloc=PyMem_Malloc.
Greetings, Bastian
pgpWJgCkSnvdH.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Replace flex malloc functions with Python memory management,
Bastian Kleineidam <=