blob: 1a7ff29dd673ce59fc40125aee53665f931adff4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
diff --git a/augeas/__init__.py b/augeas/__init__.py
index 9bd97bf..c295228 100644
--- a/augeas/__init__.py
+++ b/augeas/__init__.py
@@ -32,7 +32,7 @@ format and the transformation into a tree.
from sys import version_info as _pyver
-from augeas.ffi import ffi, lib
+from augeas.ffi import ffi, lib, c89
__author__ = "Nathaniel McCallum <nathaniel@natemccallum.com>"
__credits__ = """Jeff Schroeder <jeffschroeder@computer.org>
@@ -540,8 +540,8 @@ class Augeas(object):
# Create a python string and append it to our matches list
item = ffi.string(array[i])
matches.append(dec(item))
- lib.free(array[i])
- lib.free(array)
+ c89.free(array[i])
+ c89.free(array)
return matches
def span(self, path):
diff --git a/augeas/ffi.py b/augeas/ffi.py
index a24daf5..9cfcd02 100644
--- a/augeas/ffi.py
+++ b/augeas/ffi.py
@@ -45,6 +45,7 @@ void free(void *);
""")
lib = ffi.dlopen("augeas")
+c89 = ffi.dlopen(None)
if __name__ == "__main__":
ffi.compile(verbose=True)
|